Kyle R. Burton on 17 Nov 2010 06:22:06 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] git question


I think the command for unstaging is:

  git reset HEAD

In my experience, I haven't seen git mismanage the contents of a
repository.  A mistake I've made in the past is in being overly
aggressive and accidentally adding things like build output to the
repository, then as I build/clean, git identifies things as having
been removed.

Another culprit may be that you've used 'mv' to rename a directory?
If you do this, git will identify all the old stuff as removed and the
new name as not yet added.  Using 'git mv' will resolve this, and so
will adding the new name and removing the old one (git should then
recognize the rename).

HTH

Kyle

On Wed, Nov 17, 2010 at 9:15 AM, Eric at Lucii.org <eric@lucii.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I have a git repository of an existing project.  There are several thousand
> files but I only changed a few dozen.
>
> Now the index (via the git status command) tells me there are thousands of
> missing and modified files in my working directory.  The modified ones I can
> explain ("True" vs "true" for example) but I'm at a loss to understand why git
> thinks I don't have almost 2000 files that I DO have.
>
> What is the git command to clear out this index without losing any of my changed
> files?  It is alluded to on this page:
> http://book.git-scm.com/1_the_git_index.html
> but he never says what the command is.
>
> Thanks
> Eric
>
> - --
> #  Eric Lucas
> #
> #                "Oh, I have slipped the surly bond of earth
> #                 And danced the skies on laughter-silvered wings...
> #                                        -- John Gillespie Magee Jr
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkzj44gACgkQ2sGpvXQrZ/4DVgCgvWKZc+D0hlPkS2ZiMVQ9mKBK
> kKgAoMRSucvGccUx49HYOrU8UkQI1fCJ
> =SfYL
> -----END PGP SIGNATURE-----
> ___________________________________________________________________________
> Philadelphia Linux Users Group         --        http://www.phillylinux.org
> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
>



-- 
Twitter: @kyleburton
Blog: http://asymmetrical-view.com/
Fun: http://snapclean.me/
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug