2017-07-18 48 views
1
* 9dbd857 (hotfix-correct-java-jdk-path, feature/add-ansible-galaxy-requirements-file) requirements.yml: adds maven and nodejs requirements 
* 1643619 (QOL-1640-enable-vpc-peering) roles/ansible-linux-commons: change value of hostname in cloud-init 
* b5fd2a4 roles/bamboo-agent: add bitbucket ssh host key to /etc/ssh/ssh_known_hosts 
* d5cc1f7 vpc cfn template: produce outputs conditionally 
* 3b87efe vpc cfn template: use csv for subnet/AZ mapping 
* 2e93096 roles/bamboo-agent: Install chrome on agents 
* 9aeb07e roles/bamboo-agent: install chromium browser 
* 89e852d (HEAD -> feature/QOL-1649-install-chrome) README: display the current directory structure of inventories 
* 1f55c4b inventories/test: define root volume size 
* 07d902e bamboo-ec2 cfn: specify root volume size 

這是我的(最近的)歷史。git fast-forward one commit

我想feature/QOL-1649-install-chrome向上移動一個提交到9aeb07e

我嘗試了櫻桃採摘,但後來我得到一個「複製」的承諾feature/QOL-1649-install-chrome分支。但是我想(我認爲)是快進的。

回答

2
git checkout feature/QOL-1649-install-chrome 
git merge --ff-only 9aeb07e 

git reset --hard 9aeb07e 

,而不是合併。

3

你可以git reset它,但爲了一般的安全和清潔,我更喜歡使用git merge --ff-only。要使用它,檢查出的分支,你想快進(你已經),然後運行git merge --ff-only <commit-hash>

git merge --ff-only 9aeb07e 

我經常說我做了它的別名,git mff(合併快進)使用此命令。

+0

謝謝。我嘗試了'git reset'並且它能夠工作,但'git merge'的[安全感]讓我更開心! –

+0

對我來說也是一樣 - 我運行'git fetch',然後'git mff'而不是'git pull'。如果這個mff失敗了,我會看看我是想合併還是重新綁定。如果mff成功,它幾乎總是我想要的。 – torek