skaterdav85

Git: Staging All Untracked And Modified Files

14 posts in this topic

Is there a way to stage all untracked and modified files using Git? I cant seem to find this anywhere. I know that if you do:

git .

it stages the entire folder I can stage each one individually but it is kind of a pain when the files are in different folders.

1 person likes this

Share this post


Link to post
Share on other sites

I know it's covered in this presentationhttp://yuilibrary.com/theater/jenny-donnelly/f2esummit2011-donnelly/ and I told myself to remember it because I want to do it all the time, but I haven't gotten a chance to go back and see it again. or it might be a way to commit/push in one fell swoop, but I think your answer is in there.

Share this post


Link to post
Share on other sites

So I think the command is just:

git add .

Sound about right? I tried it and it looks like it staged just the files I modified or newly created files.

Share this post


Link to post
Share on other sites

Just curious... have you considered using a GUI tool like TortoiseGit for example? Things like that are a check box away there.

Share this post


Link to post
Share on other sites

Woa, I havent heard of this. I have a mac and after you get used to the terminal, it's not all that hard to use. Looks like this is only for PC, which I may use whenever I'm on a PC. I've tried Tower before I was familiar with the terminal and I thought it was pretty good. Except you have to pay for it so I just went with learning the commands, which is probably a more valuable skill to have anyways.

Share this post


Link to post
Share on other sites

I just noticed this... I didn't even know GitHub made ANY clients.

Share this post


Link to post
Share on other sites

interesting! Im downloading it now. Might be a nice visual way to interact with GitHub. Thanks for sharing

Share this post


Link to post
Share on other sites

It is a nice way to interact with GitHub, but it isnt a GUI for just using Git. Still, very useful since sometimes its hard to remember the commands for pushing to GitHub like "git push origin master"

Share this post


Link to post
Share on other sites

The GitHub for Mac documentation says you can use it for any Git repository: "... if you wish to use a non-GitHub remote, it will work just fine. Set the remote manually in the settings tab and everything else should work as expected."

Share this post


Link to post
Share on other sites
Woa, I havent heard of this. I have a mac and after you get used to the terminal, it's not all that hard to use. Looks like this is only for PC, which I may use whenever I'm on a PC. I've tried Tower before I was familiar with the terminal and I thought it was pretty good. Except you have to pay for it so I just went with learning the commands, which is probably a more valuable skill to have anyways.
http://gitx.frim.nl/

Share this post


Link to post
Share on other sites

Actually, when I installed git (from, I believe, here: http://git-scm.com/), it came with a a program called Git GUI which is surprisingly good. If you want an excellent free reference, there is link to a PDF here: http://w3schools.invisionzone.com/index.php?showtopic=40026&view=findpost&p=221950 The Tower client looks pretty sweet, but its mac-only and not free. Come on, shouldn't you have a free GUI for a free, open source VCS?

Share this post


Link to post
Share on other sites

Thanks for the resources! I actually just installed Git on my work computer (a PC) and I noticed there was a Git GUI program along with Git Bash. I just used Git Bash since I am familiar with the terminal commands but maybe I should give the GUI version a shot. How do you like it? Easy to use? I guess for macs we're just left w the command line, which is fine i guess but it was a bit to learn when i first started. Thankfully, im over that hump now.

Share this post


Link to post
Share on other sites

The Git GUI really simplifies a lot of things. I stumbled through using the Git Bash, and it was a tremendous learning experience. But I still prefer GUI tools over it at this point, for the more complex procedures.

Share this post


Link to post
Share on other sites

If you are on a linux machine, you can probably just use find

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now