git 實(shí)戰(zhàn)中遇到問題總結(jié)斜筐!
- 1
git reset --hard HEAD^
切換到上一個(gè)版本 - 2
git reset --hard HEAD^^
切換到上上一個(gè)版本 - 2
git reset --hard HEAD~100
切換到上n版本 - 4
git reset --hard 3628164
切換到某一指定版本 - 5
git reset 3628164
將目前commit的所有代碼帶到 3628164 版本
- 6
git reset 3628164 --hard
回到上一個(gè)版本不存到倉庫 - 7
git add -u
添加修改的文件到git倉庫 - 8
git status -s
查看git倉庫狀態(tài) - 9
git commit -m 'aa'
提交本地git倉庫 - 10
git push origin feature/wgp/foo
提交遠(yuǎn)程git倉庫 - 11
phpcheck mall/page/qiang/ActionController.php
檢測(cè) - 12
phpfix mall/page/qiang/ActionController.php
修復(fù) - 13
git init --bare
創(chuàng)建一個(gè) .git 倉庫 - 14
git clone gitserver/ client1
克隆gitServer 到 client里邊去挑宠! - 15
git remote -v
查看遠(yuǎn)程
)}GO9~EY7_WZPZ9YRU3CB49.png - 16
git remote add origin git@github.com:wanggaopeng/gaopeng.gitgit
push -u origin master
git remote remove
和 git remote rename
git remote rename origin local
把origin修改成local
git remote remove iosw
把iosw刪除
git remote rename wang origin
把wang修改成origin
git help remote
2016-11-14_111406.png
2016-11-14_112123.png
- 16
git branch
查看當(dāng)前分支
git branch -v
- 17
git branch -r
查看遠(yuǎn)程分支 - 18
git push origin master:master
本地分支推向遠(yuǎn)程master分支 可簡寫成git push origin master
git push origin master:devlop
本地分支推向遠(yuǎn)程devlop分支
git push origin :devlop
本地空分支推向遠(yuǎn)程devlop分支 =刪除遠(yuǎn)程devlop分支现喳。 - 19
git pull origin master:master
將遠(yuǎn)程分支pull到本地焰檩,第一個(gè)master 表示遠(yuǎn)程的鲜戒,第二個(gè)master表示本地斤蔓〗醯#可簡寫成git pull origin master
git push 有沖突報(bào)的錯(cuò)!
1.png
> git pull origin master
Automatic merge failed; fix conflicts and then commit the result.
2016-11-15_114341.png
git 操作
git reset 3628164
-
git status -s
查看狀態(tài) -
git add .
添加到git倉庫 -
git commit --amend
提交到本次commit -
git push origin develop -f
強(qiáng)制推到遠(yuǎn)程倉庫凉倚。
git fetch origin feature/wgp/foo:feature/wgp/foo
- 將遠(yuǎn)程分支fetch到本地
Tables | Are | Cool |
---|---|---|
col 3 is | right-aligned | $1600 |
col 2 is | centered | $12 |
zebra stripes | are neat | $1 |
**編輯獎(jiǎng)品價(jià)格區(qū)間管理 **
public function editPrize(){
$id = $this->get('id');
$where['interval_id'] = $id;
$orderApi = ANew('order');
$price_edit = $orderApi->getPriceRange($where);
$this->set('price_edit',$price_edit);
$this->setView('guanli/orders/order_setting/tpl/add_prize_price.phtml');
} ```