在Idea中使用git从远程仓库pull和push文件

1  打开idea-> VCS-> import into Version control ->  create git repository 

2  在本地目录下建立ignore list

3  写完代码后,右键-> git -> 先add,再commit directory  在Commit changes的中选择commit and push

  点击 define romote 输入远程的url地址即可

4  右键-> git->repository-> pull即可将远程中的master支点的数据下载

5  右键-> git -> repository -> new branches即可建立新的分支,

6  在Idea的右下角的local branches中可以选择新建的支点进行修改,修改完后

  点击右键->git -> repository ->push可以将分支数据上传

7  在右下角中点击 remote branches中的分支,会出现对话 checkout as 之后重命名即可将远程分支拉到本地

猜你喜欢

转载自www.cnblogs.com/zxq-Study-Java/p/9966852.html