First, install Git from here.
Command | Description |
---|---|
git init |
Initialize a repository in the current directory |
git add . |
Start tracking all non-ignored files |
git commit -m "message" |
Create a commit with a given message |
git remote add origin [url] |
Add the remore repo with the [url] as the origin . |
git push -u origin master |
First push to the remote repo, the origin branch. Sets the origin branch as the upstream for local master at the same time. |
git push |
after the upstream is set, all further pushes are as simple as this |
Congratulations! Your code is now version-controlled and backed up to the remore server!