Commit 30496d00 authored by Toby Huang's avatar Toby Huang Committed by Commit Bot

Documentation-only change to commit_checklist.md about @{u} tip in git

Add tip about @{u} as short-hand for the upstream branch when trying
to squash commits using `git rebase -i @{u}`.

Bug: None
Change-Id: I8b06ccdb976fdfe84eac858d3871fac8f85c2f74
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1993498Reviewed-by: default avatarAga Wronska <agawronska@chromium.org>
Commit-Queue: Toby Huang <tobyhuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#729862}
parent d3517f13
...@@ -73,8 +73,8 @@ Run `git commit`. Here are some ...@@ -73,8 +73,8 @@ Run `git commit`. Here are some
If you have many commits on your current branch, and you want to avoid some If you have many commits on your current branch, and you want to avoid some
nasty commit-by-commit merge conflicts in the next step, it is recommended to nasty commit-by-commit merge conflicts in the next step, it is recommended to
squash your commits into a single commit. This is done by running `git rebase -i squash your commits into a single commit. This is done by running `git rebase -i
<upstream-branch>`. The upstream branch is usually origin/master, but check `git @{u}`. The `@{u}` is a short-hand pointer for the upstream branch, which is
branch -vv` to make sure. After running the git rebase command, you should see a usually origin/master. After running the git rebase command, you should see a
list of commits, each commit starting with the word "pick". Make sure the first list of commits, each commit starting with the word "pick". Make sure the first
commit says "pick" and change the rest from "pick" to "squash". This will squash commit says "pick" and change the rest from "pick" to "squash". This will squash
each commit into the previous commit, which will continue until each commit is each commit into the previous commit, which will continue until each commit is
...@@ -86,7 +86,7 @@ Run `git rebase-update`. This command updates all of your local branches with ...@@ -86,7 +86,7 @@ Run `git rebase-update`. This command updates all of your local branches with
remote changes that have landed since you started development work, which remote changes that have landed since you started development work, which
could've been a while ago. It also deletes any branches that match the remote could've been a while ago. It also deletes any branches that match the remote
repository, such as after the CL associated with that branch had merged. You may repository, such as after the CL associated with that branch had merged. You may
run into rebase conflicts which should be manually fixed before proceeding with run into rebase conflicts, which should be manually fixed before proceeding with
`git rebase --continue`. Rebasing prevents unintended changes from creeping into `git rebase --continue`. Rebasing prevents unintended changes from creeping into
your CL. your CL.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment