android studio git

转载Android Studio Git Tutorial (Part 1)

  • 安装Git for Windows.
  • 设置git tools path
File > Settings > Version Control > Git

可以如下图点击Test按钮来检测成功了没。

android studio git_第1张图片
git tool test.PNG

  • 使用版本控制整合
VCS > Enable Version Control Integration > select "Git"
android studio git_第2张图片
git add.PNG

打开git bash
去到项目路径下
Git Bash > key in add remote

git remote add origin [[email protected]](mailto:[email protected]):user/android-studio-git.git

android studio git_第3张图片
command.PNG

Step 3 : Add to VCS(git add)
Select > 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.

android studio git_第4张图片
commit.png

Step 5 : Git Push(git commit)
VCS > Git > Push
If your repository is empty, you must select Push current branch to alternative branch
android studio git_第5张图片
git push.png

If push completely, you will see Push Secessfully at the bottom of Android Studio.

你可能感兴趣的:(android studio git)