The only github commands you ever need
These are the github commands that I started with and I would like to share the same with you.
git init
-> to initialize a github repositorygit add .
-> adds all the files to be committedgit commit -m "the reason of the commit"
-commits the files ready to be pushedgit push -u origin branch_name
-> pushes the files to the repository
Ignore hidden files
.*
!/.gitignore
[1]
Advanced commands - Don’t attempt these, if you are a git beginner
git rm -r --cached .
-> This removes the index but the files resides on the local disk. It is important when you add files in .gitignore
and is not updated. [2]
git clone -b <branchname> <remote-repo-url>
-> to clone from a specific branch