After tagging some source code with the wrong email address!!! its time to make some git notes

Config

For every repository:

git config --global user.email "email@example.com"

For single repository:

git config user.email "email@example.com"

See https://help.github.com/articles/setting-your-commit-email-address-in-git/

Branches

Create a new branch

git branch branch-name

List branches

git branch

Checkout new branch

git checkout branch-name

Push new branch to repo

git push -u origin branch-name

Set remote branch example

git push --set-upstream origin add-sources-and-sinks

Merge back into main

git branch master
git merge branch-name

List merged branches

git branch --merged

Remove old branches

git branch -d old-branch ;local branch removal

Unused or unmerged branches

git branch --no-merged

See git housekeeping

Tags

Create a tag on a specific commit

List the commits

git log --pretty=oneline
8547a37a91c6d0a22606ae9b4be8afee6cb5893f Initial commit
fa437248eb9fc555283b688ce258bc0d3e0987ff Fixed up to serve the js and index pages from the default route

Tag on the current branch at the latest commit

git tag v1.1.1

Or tag a specific commit on the branch that a commit occurred using the sha

git tag -a v0.0.1 8547a37a91c6d0a22606ae9b4be8afee6cb5893f -m"Works with cljs-react-material-ui"

Or a specific branch

git tag v1.0 other-branch-name

Delete

get tag -d v0.0.1

Share a tag to bitbucket

git push origin v0.0.1

Or for a lot of tags

git push origin --tags

Show files under a tag

git show --name-only <tagname>
-->
tag v0.0.1
Tagger: pm <dev@softwarebynumbers.com>
Date:   Thu Nov 22 08:59:43 2018 +0000
Works with cljs-react-material-ui
commit 8547a37a91c6d0a22606ae9b4be8afee6cb5893f
Author: pm <dev@softwarebynumbers.com>
Date:   Thu Nov 22 08:35:38 2018 +0000
    Initial commit
    resources/public/index.html
    src/cljs/sa/screens/core.cljs
    src/cljs/sa/screens/login/login_screen.cljs
    src/cljs/sa/screens/mui_themes.cljs

Commit History

git log --pretty=oneline

Adding Files

git add -u add all updated