转载Android Studio Git Tutorial (Part 1)
- 安装Git for Windows.
- 设置git tools path
File > Settings > Version Control > Git
可以如下图点击Test按钮来检测成功了没。
- 使用版本控制整合
VCS > Enable Version Control Integration > select "Git"
git add.PNG
打开git bash
去到项目路径下
Git Bash > key in add remote
git remote add origin [git@192.168.0.1](mailto:git@192.168.0.1):user/android-studio-git.git
command.PNG
Step 3 : Add to VCS(git add)
Select <project/file> > VCS > Git > Add to VCS[图片上传中。。。(4)]
Step 4 : Commit Changes(git commit)
VCS > Commit Changes...
Write down commit message, then choose commit.
If you select Commit and Push..., the git push window will pop up.
Step 5 : Git Push(git commit)
VCS > Git > Push
If your repository is empty, you must select Push current branch to alternative branch
git push.png
If push completely, you will see Push Secessfully at the bottom of Android Studio.
网友评论