Git

From Athenaeum
Revision as of 10:46, 5 April 2019 by James8562 (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Random

  • To list tags
git tag -l
  • Extract a tag from a git repo
git archive --format zip --output /full/path/to/zipfile.zip {tag name}

Rename A Branch

1. Rename branch locally

git branch -m old_branch new_branch

2. Delete the old branch

git push origin :old_branch

3. Push the new branch, set local branch to track the new remote

git push --set-upstream origin new_branch