git 基本命令记录
生活随笔
收集整理的這篇文章主要介紹了
git 基本命令记录
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
git拷貝項目
git config --global user.name "xxx"
git config --global user.email "xxx@xx.cn"
git init myjob
cd myjob/
git clone xxx.git myjob
git創(chuàng)建分支并切換
git checkout -b debug
? ? 或
git branch debug
git checkout debug
git查看分支
git branch
git 合并分支
git merge debug
git 刪除分支
git branch -d debug
git合并后保存分支信息
git merge --no--ff -m "debug分支 禁用FastForward" debug
git保存當前工作分支
git stash
git恢復當前分支
git stashlist(查看分支恢復區(qū))
git stash apply
git stash drop
? ? 或
git stash pop
git 強制刪除分支
git config --global user.name "xxx"
git config --global user.email "xxx@xx.cn"
git init myjob
cd myjob/
git clone xxx.git myjob
git創(chuàng)建分支并切換
git checkout -b debug
? ? 或
git branch debug
git checkout debug
git查看分支
git branch
git 合并分支
git merge debug
git 刪除分支
git branch -d debug
git合并后保存分支信息
git merge --no--ff -m "debug分支 禁用FastForward" debug
git保存當前工作分支
git stash
git恢復當前分支
git stashlist(查看分支恢復區(qū))
git stash apply
git stash drop
? ? 或
git stash pop
git 強制刪除分支
git branch -D debu
git推送分支(本地分支,服務(wù)器上是不知道的)
git remote
git push origin debug
git checkout -b debug origin/debug(切換到遠程的debug分支上進行開發(fā))
(沖突時 先把最新提交從服務(wù)器上抓取下來)再git push 提交
git branch --set-upstream debug origin/debug
git pull
總結(jié)
以上是生活随笔為你收集整理的git 基本命令记录的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 对于url出现jsessionid问题
- 下一篇: 通过反射执行方法