Search code examples
windowsgitversion-controlgit-gui

Is there a better way to make an initial GIT commit for a web application?


Possible Duplicate:
Git GUI.. stage everything

My employer is finally looking into setting up some source control after much pleading by all of the developers. Unfortunately, none of our developers, inclusive of myself, have ever done much with source control. I've looked into SVN and thought that would be fine but another of the developers didn't like it. I've moved on to looking at GIT as an option. I've downloaded the GIT GUI from http://git-scm.com and started tinkering with it which brings me to my question/problem.

The web application we're trying to add to source control (GIT) is 7,386 files and 712 folders. When doing the initial commit, from what I understand, I've got to click on each file I want to commit to move it from the Unstaged Changes to Staged Changes pane. Well obviously I am hesitant to sit and click 7,386 times (once for each file to commit). Is there another faster way to do this?

I'm currently using this page as my reference to learn to use the GIT GUI http://nathanj.github.com/gitguide/tour.html. If anyone has a better tutorial/reference for using the GIT GUI I'd much appreciate linking me to it.

Thanks


Solution

  • To add every file (that is not ignored), use

    cd /path/to/workspaceRoot
    git add .
    

    I don't use any gui, but I think this should be possible by adding a directory (the root directory in this case).

    Remember to create a appropriate .gitignore file before, so no unwanted files get added. You can check, what is (un)staged with

    git status
    

    Also, there should be a context option (or something like that) in your gui, that provides status.

    Extra: Additional git resource (quite good imo) http://progit.org/