From 431a5c8759f97f38f54791917ad5b9cf8dd0d682 Mon Sep 17 00:00:00 2001 From: Charles Tang Date: Fri, 25 Dec 2015 15:17:15 +0800 Subject: [PATCH 1/2] git-pull with rebase argument use rebase could cause a clean and linear history, it's a good habit. --- pages/common/git-pull.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/git-pull.md b/pages/common/git-pull.md index 49a69948ef..0bd1d54e4d 100644 --- a/pages/common/git-pull.md +++ b/pages/common/git-pull.md @@ -6,6 +6,10 @@ `git pull` +- Download changes from default remote repository and use fast forward + +`git pull --rebase` + - Download changes from given remote repository and branch, then merge them into HEAD `git pull {{remote_name}} {{branch}}` From 3142f57a611203cc819cce775aac7664fb338f85 Mon Sep 17 00:00:00 2001 From: Charles Tang Date: Fri, 25 Dec 2015 15:21:32 +0800 Subject: [PATCH 2/2] git-clone with --depth argument when use git-clone with --depth argument will save your time remove following space of lines which will cause trouble in index building. --- pages/common/git-clone.md | 4 ++++ pages/common/git-pull.md | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/common/git-clone.md b/pages/common/git-clone.md index c8425c5434..ae355a2879 100644 --- a/pages/common/git-clone.md +++ b/pages/common/git-clone.md @@ -13,3 +13,7 @@ - Do it quietly `git clone -q` + +- Clone an existing repository, and truncate to the specified number of revisions, save your time mostly + +`git clone --depth 10 {{REMOTE-REPOSITORY-LOCATION}}` diff --git a/pages/common/git-pull.md b/pages/common/git-pull.md index 0bd1d54e4d..5f5188a78f 100644 --- a/pages/common/git-pull.md +++ b/pages/common/git-pull.md @@ -6,7 +6,7 @@ `git pull` -- Download changes from default remote repository and use fast forward +- Download changes from default remote repository and use fast forward `git pull --rebase`