mirror of
https://github.com/tiimgreen/github-cheat-sheet.git
synced 2025-08-08 08:56:35 +02:00
Merge pull request #50 from hkdobrev/github-merged-branches
Add tutorial of GitHub branches page
This commit is contained in:
29
README.md
29
README.md
@@ -11,6 +11,7 @@ A collection of cool hidden and not so hidden features of Git and GitHub. This c
|
||||
- [Adjust Tab Space](#adjust-tab-space)
|
||||
- [Commit History by Author](#commit-history-by-author)
|
||||
- [Cloning a Repository](#cloning-a-repository)
|
||||
- [Compare all branches to another branch](#compare-all-branches-to-another-branch)
|
||||
- [Comparing Branches](#comparing-branches)
|
||||
- [Compare Branches across Forked Repositories](#compare-branches-across-forked-repositories)
|
||||
- [Gists](#gists)
|
||||
@@ -98,6 +99,34 @@ $ git clone https://github.com/tiimgreen/github-cheat-sheet
|
||||
|
||||
[*Read more about the Git `clone` command.*](http://git-scm.com/docs/git-clone)
|
||||
|
||||
### Compare all branches to another branch
|
||||
|
||||
If you go to (click the branches link next to commits):
|
||||
|
||||
```
|
||||
https://github.com/{user}/{repo}/branches
|
||||
```
|
||||
|
||||
You would see a list of all branches which are not merged into the main branch (e.g. `master`).
|
||||
|
||||
You could go to the compare page or delete a branch with a click of a button.
|
||||
|
||||

|
||||
|
||||
However often you need to compare branches to a branch other than `master` (e.g. `development`). Just append the name of the branch to the URL like so:
|
||||
|
||||
```
|
||||
https://github.com/{user}/{repo}/branches/{branch}
|
||||
```
|
||||
|
||||

|
||||
|
||||
If you want to see the merged branches you need to append `?merged=1` to the URL. There is a link of that on top.
|
||||
|
||||

|
||||
|
||||
This view is very nice if you want to find yout which branches to delete (and delete them right from the page) right on GitHub.com.
|
||||
|
||||
### Comparing Branches
|
||||
To use GitHub to compare branches, change the URL to look like this:
|
||||
|
||||
|
Reference in New Issue
Block a user