开发者

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

This question already has answers here: Closed 11 years ago.

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 tuto开发者_开发知识库rial/reference for using the GIT GUI I'd much appreciate linking me to it.

Thanks


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/


From Git-GUI select all files in the "Unstaged changes" list and select "Commit->Stage to commit" in the menu.


If you're not afraid of the command line, try this tutorial instead. It's a detailed walkthrough of beginning git in 10 parts and ends with a Git reference card to help you go further. The free Pro Git book is also much applauded.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜