Part 2: Git Handy Notes (Part 2)
Part 1: Git Handy Notes (Part 1)
These are the bare minimum steps you need to take in order to initialise a brand new Git repo. You usually do this when you are about to begin a new coding project, and you want to set up a “blank” master branch and a “blank” dev branch before you write your codes.
You do this because you do not want your first commit to include code files, project files, and other stuff.
git init
To specify your desired Username:
git config user.name [Desired Username]
To specify your desired Email:
git config user.email [Desired Email]
If you do not want to include an email, you can use this instead.
git config user.email "<>"
git commit --allow-empty -m "Initial Creation"
git remote add origin [URL of remote repository]
git push -u origin master
git checkout -b dev
git push -u origin dev