拉取git项目
File -> New -> Project from Version Control…
  然后点击clone,等待即可
提交(commit) 拉取(pull) 推送(push) 代码
有多种方式可以进行操作,文章中只列举一种
多人合作分支:commit -> pull -> push,防止代码丢失 单人分支:commit and push,后续弹窗中进行push选择
commit
项目名右击 -> Git -> Commit Directory… 
pull 或 push
项目名右击 -> Git -> Repository -> 选择相应操作,注意拉取和提交的对应分支是否选择正确 
合代码
不同分支合代码
描述:有分支A,分支B,现计划将分支A的部分代码合到分支B上
-
切换本地分支为目标分支,即将代码合到此分支上,记为分支A
-
合代码
-
将需要修改的文件修改完毕后可将代码推送到远程分支B 操作顺序:commit修改内容 -> pull再次拉取代码,保证代码最新 -> push修改内容到远程分支
对单独一个文件进行代码合并操作
- 在当前项目文件右击 -> Git -> compare with… 和本分支的历史版本做对比
- 在当前项目文件右击 -> Git -> compare with the Same Repository Version 和当前版本做对比(即和修改之前的做对比)
- 在当前项目文件右击 -> Git -> compare with Branch 和其他分支版本做对比
 to be continued …
|