Git常用命令

  1. git clone url

從遠程倉庫克隆代碼

 

  1. 創建分支並提交代碼

Step 1:在本地新建分支

git branch newBranch

Step 2:把本地分支push到遠程

        git push  origin newBranch

Step 3:切換分支到newBranch

        git  checkout newBranch

Step 4:查看本地修改

        git status

Step 5:添加本地修改

        git add .

Step 6:commit修改

        git commit -m “XXXX”

Step 7:push 代碼

        Git  push

https://blog.csdn.net/roczheng1990/article/details/82018568

https://www.cnblogs.com/bluestorm/p/6252900.html

 

There is no tracking information for the current branch.

Please specify which branch you want to merge with.

See git-pull(1) for details.

 

    git pull <remote> <branch>

 

If you wish to set tracking information for this branch you can do so with:

 

    git branch --set-upstream-to=origin/<branch> 1.2.2_700

 

2、git 創建、刪除tag

git tag  1.2.711_5  創建1.2.711_5tag

git push origin 1.2.711_5 將tag  1.2.711_5推送到遠程倉庫

git tag -d 1.2.711_5  刪除本地tag

 

3、git 查看遠程地址

git   remote -v

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章