git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* behaviour of .gitignore
@ 2012-05-25 16:32 J.V.
  2012-05-25 17:31 ` Matthieu Moy
  2012-05-25 22:41 ` Neal Kreitzinger
  0 siblings, 2 replies; 3+ messages in thread
From: J.V. @ 2012-05-25 16:32 UTC (permalink / raw)
  To: git

On my local machine, I create a /bin/ directory added some bash scripts, 
comitted and then pushed them to the repository.

Now today I do a git pull and they are gone but cannot see that anyone 
deleted them in the git log / history, but there is a /bin/ entry in the 
.gitignore file.

Does this mean, the files are still in the shared repository (orgin) 
that I could get them back?

I tried removing /bin/ from the git ignore and doing a pull but my /bin/ 
directory is still not there.

Is there anyway to do a pull now and have it look at my local gitignore 
and pull the directory back?

thanks


J.V.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: behaviour of .gitignore
  2012-05-25 16:32 behaviour of .gitignore J.V.
@ 2012-05-25 17:31 ` Matthieu Moy
  2012-05-25 22:41 ` Neal Kreitzinger
  1 sibling, 0 replies; 3+ messages in thread
From: Matthieu Moy @ 2012-05-25 17:31 UTC (permalink / raw)
  To: J.V.; +Cc: git

"J.V." <jvsrvcs@gmail.com> writes:

> On my local machine, I create a /bin/ directory added some bash
> scripts, comitted and then pushed them to the repository.

Can you check that "git show --stat" on the commit you did actually
shows the files as added?

> Now today I do a git pull and they are gone but cannot see that anyone
> deleted them in the git log / history, but there is a /bin/ entry in
> the .gitignore file.

What does "git log -- bin" say?

What does "git status" say?

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: behaviour of .gitignore
  2012-05-25 16:32 behaviour of .gitignore J.V.
  2012-05-25 17:31 ` Matthieu Moy
@ 2012-05-25 22:41 ` Neal Kreitzinger
  1 sibling, 0 replies; 3+ messages in thread
From: Neal Kreitzinger @ 2012-05-25 22:41 UTC (permalink / raw)
  To: J.V.; +Cc: git

On 5/25/2012 11:32 AM, J.V. wrote:
> On my local machine, I create a /bin/ directory added some bash
> scripts, comitted and then pushed them to the repository.
>
You should be able to click on that commit in gitk and see that the
files were added (confirm you really added them).

> Now today I do a git pull and they are gone but cannot see that
> anyone deleted them in the git log / history, but there is a /bin/
> entry in the .gitignore file.
>
If that ignore entry was there when you did the commit then maybe you
never really committed them.

> Does this mean, the files are still in the shared repository (orgin)
>  that I could get them back?
>
The gitk step above will tell you if they are there.

> I tried removing /bin/ from the git ignore and doing a pull but my
> /bin/ directory is still not there.
>
Its not looking like you really committed them like you thought you did.

> Is there anyway to do a pull now and have it look at my local
> gitignore and pull the directory back?
>
If the files were really committed, then you should have that commit in
your history also.  Therefore, you should be able to 'git checkout' 
those files into your worktree.

v/r,
neal

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-25 22:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-25 16:32 behaviour of .gitignore J.V.
2012-05-25 17:31 ` Matthieu Moy
2012-05-25 22:41 ` Neal Kreitzinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).