Git的基本使用流程

我一般不在本地创建master分支。这里假设远程的repository的路径是: https://github.com/tensorflow/tensorflow

git init
git remote add origin https://github.com/tensorflow/tensorflow
git fetch origin master
git checkout -b my_local_branch origin/master

// do the change, e.g. git add new_file.py

git commit -a

git fetch origin master
git merge origin/master

git push origin HEAD:your_name/your_new_remote_branch
git branch -u origin/you_name/your_new_remote_branch

by Code问答

发表评论

电子邮件地址不会被公开。 必填项已用*标注

− 3 = 2