From 03f10d90fe504eb8cc2a619a48ca5360c0d0b0ef Mon Sep 17 00:00:00 2001 From: Marielle Volz Date: Mon, 5 Nov 2018 12:22:26 +0000 Subject: [PATCH 1/2] Add -L to follow redirects As per the comments in #154, use -L to follow the redirect for curl. The tip as written does not currently work as it downloads the html for the redirect page instead. --- tips.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tips.json b/tips.json index 43accfe..7bef1dd 100644 --- a/tips.json +++ b/tips.json @@ -104,7 +104,7 @@ "tip": "git add -p" }, { "title": "Get git bash completion", - "tip": "curl http://git.io/vfhol > ~/.git-completion.bash && echo '[ -f ~/.git-completion.bash ] && . ~/.git-completion.bash' >> ~/.bashrc" + "tip": "curl -L http://git.io/vfhol > ~/.git-completion.bash && echo '[ -f ~/.git-completion.bash ] && . ~/.git-completion.bash' >> ~/.bashrc" }, { "title": "What changed since two weeks?", "tip": "git log --no-merges --raw --since='2 weeks ago'", From bc2805558507499f137ff25009d1253d707f0654 Mon Sep 17 00:00:00 2001 From: Marielle Volz Date: Mon, 5 Nov 2018 12:25:32 +0000 Subject: [PATCH 2/2] Fix to follow redirect As per #154, change to -L so that the redirect gets followed. As written this line downloads the html redirect page. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 98d158f..09890d9 100644 --- a/README.md +++ b/README.md @@ -372,7 +372,7 @@ git add -p ## Get git bash completion ```sh -curl http://git.io/vfhol > ~/.git-completion.bash && echo '[ -f ~/.git-completion.bash ] && . ~/.git-completion.bash' >> ~/.bashrc +curl -L http://git.io/vfhol > ~/.git-completion.bash && echo '[ -f ~/.git-completion.bash ] && . ~/.git-completion.bash' >> ~/.bashrc ``` ## What changed since two weeks?