Push the code to coding, use the following three commands when submitting for the first time,
# git add .
# git commit -m"init project"
# git push
What I want to ask is, every time I change the code in the future, will I execute these three commands when I want to submit it?
phpcn_u15822017-05-02 09:32:12
Generally yes, if you delete a file it should be git add -A, I can’t remember clearly
仅有的幸福2017-05-02 09:32:12
add can be merged into commit -am "xxx" without new files.
In addition, it is best to git status before each commit.
给我你的怀抱2017-05-02 09:32:12
Yes, but if you want to delete a file you still need git rm
一下。还有添加.gitignore
的话得另外add
。建议时常git status
.
给我你的怀抱2017-05-02 09:32:12
Yes. But don't use specific filenames like git add .
,使用 git add filepath/filename.py
.
淡淡烟草味2017-05-02 09:32:12
If you only modify the file, the first two can be merged into one git commit -a -m ""