From 1fa146ee3051cc2dd2418a78e80bd8d2b8201baf Mon Sep 17 00:00:00 2001 From: Seth Woodworth Date: Tue, 29 Dec 2015 17:54:20 -0500 Subject: [PATCH 1/5] Adds documentation for git rebase and git fetch --- pages/common/git-fetch.md | 7 +++++++ pages/common/git-rebase.md | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 pages/common/git-fetch.md create mode 100644 pages/common/git-rebase.md diff --git a/pages/common/git-fetch.md b/pages/common/git-fetch.md new file mode 100644 index 000000000..1db31a09d --- /dev/null +++ b/pages/common/git-fetch.md @@ -0,0 +1,7 @@ +# git fetch + +> Download objects and refs from a remote repository + +- Fetch the latest changes from all remote git servers + +`git fetch --all` diff --git a/pages/common/git-rebase.md b/pages/common/git-rebase.md new file mode 100644 index 000000000..93ff2ae56 --- /dev/null +++ b/pages/common/git-rebase.md @@ -0,0 +1,7 @@ +# git rebase + +> Apply local commits on top of another branch's history + +- Rebase your local branch with the latest changes in master + +`git rebase -i master` (Then follow the directions in the terminal for merge conflicts) From 15edb80ff380ea231ee9ffe4192a49c03ac588e6 Mon Sep 17 00:00:00 2001 From: Seth Woodworth Date: Tue, 29 Dec 2015 17:54:20 -0500 Subject: [PATCH 2/5] adds better default option for git-fetch --- pages/common/git-fetch.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/git-fetch.md b/pages/common/git-fetch.md index 1db31a09d..d10b15843 100644 --- a/pages/common/git-fetch.md +++ b/pages/common/git-fetch.md @@ -2,6 +2,10 @@ > Download objects and refs from a remote repository +- Fetch new branches and update remote-tracking branches + +`git fetch {{remote_name}}` + - Fetch the latest changes from all remote git servers `git fetch --all` From a0f62e582a445ccfc46b8e0bbdd3c6097560b78b Mon Sep 17 00:00:00 2001 From: Seth Woodworth Date: Wed, 30 Dec 2015 12:35:17 -0500 Subject: [PATCH 3/5] Expands description of --bare git-init option --- pages/common/git-init.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/git-init.md b/pages/common/git-init.md index 7c3c12b97..49214d041 100644 --- a/pages/common/git-init.md +++ b/pages/common/git-init.md @@ -6,6 +6,6 @@ `git init` -- Initialize a barebones repository +- Initialize a barebones repository, suitable for use as a remote over ssh `git init --bare` From 9c70b752201cee2fcd1cee5dee0443567b987b4e Mon Sep 17 00:00:00 2001 From: Seth Woodworth Date: Wed, 30 Dec 2015 12:36:58 -0500 Subject: [PATCH 4/5] adds more examples for git-rebase --- pages/common/git-rebase.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pages/common/git-rebase.md b/pages/common/git-rebase.md index 93ff2ae56..df67a006c 100644 --- a/pages/common/git-rebase.md +++ b/pages/common/git-rebase.md @@ -2,6 +2,18 @@ > Apply local commits on top of another branch's history -- Rebase your local branch with the latest changes in master +- Rebase your local branch interactively with the latest changes in local master -`git rebase -i master` (Then follow the directions in the terminal for merge conflicts) +`git rebase -i master` + +- Rebase your local branch interactively with the latest changes from upstream + +`git fetch origin; git rebase -i origin/master` + +- Handling an active rebase merge failure, after editing conflicting file(s) + +`git rebase --continue` + +- Abort a rebase in-progress + +`git rebase --abort` From d72dea793175ac3b51c4e5c482403fddf8011737 Mon Sep 17 00:00:00 2001 From: Ruben Vereecken Date: Thu, 21 Jan 2016 13:08:45 +0100 Subject: [PATCH 5/5] Formatted git pages --- pages/common/git-fetch.md | 6 +++--- pages/common/git-init.md | 2 +- pages/common/git-rebase.md | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pages/common/git-fetch.md b/pages/common/git-fetch.md index d10b15843..3dfd3fed8 100644 --- a/pages/common/git-fetch.md +++ b/pages/common/git-fetch.md @@ -1,11 +1,11 @@ # git fetch -> Download objects and refs from a remote repository +> Download objects and refs from a remote repository. -- Fetch new branches and update remote-tracking branches +- Fetch new branches and update remote-tracking branches: `git fetch {{remote_name}}` -- Fetch the latest changes from all remote git servers +- Fetch the latest changes from all remote git servers: `git fetch --all` diff --git a/pages/common/git-init.md b/pages/common/git-init.md index 4a6005cd0..374debae0 100644 --- a/pages/common/git-init.md +++ b/pages/common/git-init.md @@ -6,6 +6,6 @@ `git init` -- Initialize a barebones repository, suitable for use as a remote over ssh +- Initialize a barebones repository, suitable for use as a remote over ssh: `git init --bare` diff --git a/pages/common/git-rebase.md b/pages/common/git-rebase.md index df67a006c..93dd4e687 100644 --- a/pages/common/git-rebase.md +++ b/pages/common/git-rebase.md @@ -1,19 +1,19 @@ # git rebase -> Apply local commits on top of another branch's history +> Apply local commits on top of another branch's history. -- Rebase your local branch interactively with the latest changes in local master +- Rebase your local branch interactively with the latest changes in local master: `git rebase -i master` -- Rebase your local branch interactively with the latest changes from upstream +- Rebase your local branch interactively with the latest changes from upstream: `git fetch origin; git rebase -i origin/master` -- Handling an active rebase merge failure, after editing conflicting file(s) +- Handle an active rebase merge failure, after editing conflicting file(s): `git rebase --continue` -- Abort a rebase in-progress +- Abort a rebase in-progress: `git rebase --abort`