"git add -A $( git rev-parse --show-cdup )" does the equivalent of
"git add -u && git add ." (in the "root" directory) in newer versions
of git. I only wish I'd seen your post -- and did a "git add --help"
-- before creating the following alias:
git config --global alias.add-rm-all '!f() { ( pushd .; cd $( git rev-
parse --show-cdup ).; git add .; if [ -n "$( git ls-files --
deleted )" ]; then git ls-files -z --deleted | xargs -0 git rm; fi;
popd ) > /dev/null; }; f }'
On Oct 13, 2:31 pm, Dustin <[EMAIL PROTECTED]> wrote:
> I have this:
>
> --------
> dhcp-21:~ 502% cat ~/bin/git-addremove
> #!/bin/sh
>
> git add -u && git add .
> --------
>
> I've meaning to see if git proper will take that.
>
> On Oct 13, 11:40 am, Markus Prinz <[EMAIL PROTECTED]>
> wrote:
>
> > On 13.10.2008, at 19:57, GitHub Support wrote:
>
> > > `git status` should tell you any uncommitted changes and untracked
> > > files
> > > also.
>
> > I've got a nifty little alias I found on the internet for such
> > occasions (I can't remember where so I can't give proper credit). It
> > works similar to Mercurials addremove command:
>
> > !addremove() { git add .; git ls-files --deleted | xargs git rm; };
> > addremove
>
> > This adds any files (both tracked and untracked) to the index, and
> > marks any files you've deleted (without using git rm) as such in the
> > index.
>
> > You can add it like this:
>
> > git config --global alias.addrm '!addremove() { git add .; git ls-
> > files --deleted | xargs git rm; }; addremove'
>
> > regards, Markus
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"GitHub" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/github?hl=en
-~----------~----~----~----~------~----~------~--~---