All you need to know to work on Github with very small team in 3 min.
Give repo name. Can be changed later.
Anyone can see
You control who can see
The first page people see when open your repo. Usually in Markdown
repo’s settings -> Collaborator -> [type Github account] -> invite
(optional) copy invite link (or create one: https://github.com/[Your User Name]/[Your Repo Name]/invitations)
Click the invitation link
git clone https://github.com/[Your User Name]/[Your Repo Name].git
If you are not owner or collaborator, you need to fork the repo and clone from your repo. If you just want to download other’s repo, use their “.git” link found in Clone or download, the big green button.
Use your editor.
Commit is to “save your changes”.
One reason why we use git is because it can revert changes and it separates “your currently working tree” and “committed files” that are stored in “.git” folder.
(in the root dir of the repo in your local)
git add .
“git add .” actually “stages” the files. But you don’t need to know the difference right now.
git push origin master
origin is the upstream.
master is the name of the branch you are working on.
If you are owner of collaborators, you can choose to make the change instantly (you have other choices in settings).
If you are not, you need to push to your repo and create a Pull Request in the original repo to actually contribute your changes.
git pull origin
Initialize an empty local git repo
Maybe you also need to set the upstream too. Just follow the instruction.
git help [command]