1 查看当前的分支git branch
user@ubuntu15:~/companyProject/Tinghua-h5$ git branch
* XXXXXX-2016-2-1
h5
master
当前的分支是 * XXXXX-2016-2-1
2 切换分支 git checkout XXXXX
git checkout XXXXX-2016-2-1 A .idea/.name
A .idea/Tinghua-h5.iml
A .idea/copyright/profiles_settings.xml
A .idea/encodings.xml
A .idea/misc.xml
A .idea/modules.xml
A .idea/vcs.xml
Switched to branch 'XXXXX-2016-2-1'
Your branch is up-to-date with 'origin/XXXXX-2016-2-1'.
3 提交代码
第一 git add 文件名
或者 git add *
第二 git commit -m ' hello '
第三 git push origin XXXXX-2016-2-1