Git commit code steps
怪我咯
怪我咯 2017-05-02 09:30:09
0
7
1461

To submit code to coding.net for the first time, use the following three commands:

# git add .
# git commit -m"init project"
# git push

So, if you modify the code in the future, do you need to execute these 3 commands every time you submit it? Is there any difference?

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(7)
为情所困

git add -A commits all changes. You can use git status to view the current changes, and then selectively commit through git add xxx.
git commit is to submit the changes locally first.
git commit -m "xxxx" where the quotation marks are the description text of the submission.
If you git commit directly, a vi interface will appear, in which you can enter the submission instructions. C-o saves, then C-x exits and commits.
Push modifications to the remote end during git push

Recommended https://book.douban.com/subject/24752672..., you can browse it generally.

刘奇

After

git add .是将当前版本库中所有修改提交到版本库暂存区中,当你commit, the temporary storage area will be cleared. Therefore, you still need to perform the add operation before submitting next time.
I have also been learning GIT recently and wrote an introductory article. You can read it: http://justin-x.cn/2016/03/29/git-StudyN...

PHPzhong

It is recommended to search for the exact same question before asking in the future

我想大声告诉你

git commit -a -m"init project"
git push

我想大声告诉你

sourcetree solves your problems! ! !

黄舟

The third item does not have to be executed, because the third item is pushed to the coding.net server. You can submit it locally first, and then push it to the server when necessary

漂亮男人

git clone -> workspace -> git add -> staging area -> git commit -> version library -> git push -> remote own warehouse -> pull request -> others Project warehouse

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template