git快进一个提交

Fel*_*rez 3 git fast-forward

* 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
Run Code Online (Sandbox Code Playgroud)

这是我(最近)的历史.

我想feature/QOL-1649-install-chrome提升一个提交,到9aeb07e.

我尝试了樱桃选择,但后来我得到了该feature/QOL-1649-install-chrome分支的"副本" .但我想要的(我认为)是快进的.

tor*_*rek 7

你可以git reset,但为了一般的安全和清洁,我更喜欢使用git merge --ff-only.要使用它,请检查您想要快进的分支(您已经),然后运行git merge --ff-only <commit-hash>:

git merge --ff-only 9aeb07e
Run Code Online (Sandbox Code Playgroud)

我经常使用这个命令,我为它做了一个别名,git mff(快速合并).


phd*_*phd 5

git checkout feature/QOL-1649-install-chrome
git merge --ff-only 9aeb07e
Run Code Online (Sandbox Code Playgroud)

或者

git reset --hard 9aeb07e
Run Code Online (Sandbox Code Playgroud)

而不是合并。