There is nothing more daunting than rebasing your first pull request. I still
remember the day I was asked to do this and, honestly, I can't recall how I
pulled it off, but I did... of course this was years ago when there was no
Update branch
button in Github
(which by the way, does a merge commit
which I personally dislike). So I'm gonna save you some time and a lot of
trouble with this mini guide.
There are only two hard things in Computer Science: cache invalidation and naming things.
-- Phil Karlton
As Phil Karlton says, naming things has, is, and will always be hard.
This is especially true when you are the new guy in the office and you are
still trying to memorize the thousands and thousands of code standards/conventions
the new team has.
Fortunately for the new guy, almost everything has a fix and when it comes down to
branch naming conventions it is as easy as following the steps described in this guide.
Syntax
|
<operation> [n]> /dev/null [options] |
Option |
Description |
operation |
The operation whose output will be redirected. |
n |
The stream to be redirected (see below). |
options |
The stream redirection options. |
Valid values for [n]:
1, standard out
2, standard error
&, both
Syntax
|
git branch <[-dr | --delete --remotes]> <remote>/<branch> |
Option |
Description |
remote |
The remote to be used. |
branch |
The remote branch to be deleted. |
Note: valid options are:
-dr, is a synonym of --delete --remotes
--delete, deletes the local branch with no pending merges.
--remotes, tells git to delete the remote tracking branch too.
Syntax
|
git branch <[-D | -d | --delete]> <branch> |
Option |
Description |
option |
The delete option to be used. |
branch |
The local branch to be deleted. |
Note: valid options are:
-D, forces the deletion of the local branch even if there are pending merges.
-d, is a synonym of --delete.
--delete, deletes the local branch with no pending merges.
Syntax
|
git diff [options] <commit>[..<commit>] [--] [<path>...] |
Option |
Description |
options |
The differen options that can be used to report the differences |
commit |
An arbitrary commit/branch to be compared. |
commit |
The second commit/branch to be compared, if omitted then HEAD (of the current branch) is used. |
path... |
If path is specified, then the comparison happens at the file level instead of commit/branch level. |
Note: common options are
--minimal, spend extra time to make sure the smallest possible diff is produced.
--summary, output a condensed summary of extended header information such as creations, renames and mode changes.
--name-only, show only names of changed files.
--name-status, show only names and status of changed files.
--diff-filter, select only files that are:
Added (A)
Copied (C)
Deleted (D)
Modified (M)
Renamed (R)
Changed (T)
Unmerged (U)
Unknown (X)
airing Broken (B)