Author:
erics , October 29th, 2020
Show All Branches, Local and Remote
Show Local Branches
Show Remote Branches
To fetch all remote branches locally
git branch - r | grep - v '\->' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | while read remote ; do git branch -- track "${remote#origin/}" "$remote" ; done
git fetch -- all
git pull -- all
Categories: How-To's , Technology Tags: All , Branch , Branches , Display , git , git branch , git branch -a , git fetch , git pull , local , remote , Show , track , view
| No comments
Author:
erics , August 2nd, 2018
git checkout -f
Categories: How-To's , Technology Tags: Branch , Checkout , Discard , git , git branch , git checkout , howto , Revert , tips , Undo
| No comments
Author:
erics , January 31st, 2018
Rename the old branch locally: git branch -m oldBranch newBranch Delete the old branch remotely: git push origin :oldBranch Push up the new branch, and make the local branch track with the new remote branch: git push –set-upstream origin newBranch
Categories: How-To's , Technology Tags: Branch , git , git branch , howto , local , remote , Rename , rename branch , tips
| No comments
Author:
erics , October 19th, 2017
Git does not download all branches unless you tell it to. Until then, they are ‘remote’ branches. Use -r to list remote branches: git branch -r git fetch –all git pull –all If you see this error: fatal: The current branch CT-37 has no upstream branch. Push the current branch and set the remote as […]
Categories: Technology Tags: Branch , fetch , git , howto , local , manage , origin , pull , Push , remote , tips
| No comments
Author:
erics , December 10th, 2012
git diff branch1..branch2
Categories: Technology Tags: Branch , Branches , Compare , Comparison , diff , git , git diff , howto , tips
| No comments
Author:
erics , November 21st, 2012
Do it locally:
git branch - d yourBranchName
Deleted branch yourBranchName (was 340c10d). Do it remotely, and please note the : below! (replace origin with your repo, if different)
git push origin : yourBranchName
To git.yourServer.com:/repos/yourProject.git – [deleted] yourBranchName
git push origin -- delete yourBranchName
Categories: How-To's , Technology Tags: Branch , Delete , git , howto , Push , Remove , Repo , tips
| No comments
Author:
erics , November 15th, 2012
git rev-parse –abbrev-ref HEAD
Categories: How-To's , Technology Tags: Branch , Checked Out , Checkout , Current , git , howto , tips
| No comments