Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349180 - push of new file to remote repo loses the file
Summary: push of new file to remote repo loses the file
Status: RESOLVED WORKSFORME
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-13 08:13 EDT by Edwin Lukaweski CLA
Modified: 2011-06-29 11:04 EDT (History)
1 user (show)

See Also:


Attachments
screenshot: gitk showing a local non-committed change (126.12 KB, image/png)
2011-06-29 07:51 EDT, Matthias Sohn CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Edwin Lukaweski CLA 2011-06-13 08:13:02 EDT
Build Identifier: 

If I have added a new directory and file in my local branch (and repo) and I then push these changes to a remote (after doing a commit), the new directory and file are not present in the remote repo. Further, when I look at the log of the remote repo, via another GIT viewer, I see a commit, on the master branch, with the comment "working dir changes" and the result that the directory and file have been deleted from the remote repo. Also, this commit has a hash of "000...000" (all zeros).
Why is this happening?

Reproducible: Always
Comment 1 Matthias Sohn CLA 2011-06-29 07:50:24 EDT
(In reply to comment #0)
> Build Identifier: 
> 
> If I have added a new directory and file in my local branch (and repo) and I
> then push these changes to a remote (after doing a commit), the new directory
> and file are not present in the remote repo. 

Did you commit your change before pushing ?

> Further, when I look at the log of
> the remote repo, via another GIT viewer, I see a commit, on the master branch,
> with the comment "working dir changes" and the result that the directory and
> file have been deleted from the remote repo. Also, this commit has a hash of
> "000...000" (all zeros).

Which Git viewer are you using here? This looks like a local modification you did in your working directory without committing it to the local repository. If that's true everything works as designed as push only transfers changes committed to the local repository.

I tried that with gitk on some local uncommitted change using gitk as git viewer
and it looks like this is what you describe here. See attached screenshot.
Comment 2 Matthias Sohn CLA 2011-06-29 07:51:49 EDT
Created attachment 198820 [details]
screenshot: gitk showing a local non-committed change

marked what you described with red frames
Comment 3 Matthias Sohn CLA 2011-06-29 07:52:42 EDT
Seems to work as designed
Comment 4 Edwin Lukaweski CLA 2011-06-29 11:04:03 EDT
ok....thanks for the response....I'll follow up and learn something