This page covers my notes for the version control system, git.


Create a new git repo.

git init

Add a file into the changelist to be tracked.

git add <file>

Submit the files that are in the changelist.

git commit -m "<message>"

Add a remote repo.

git remote add origin <repo-url>

Push the local repo to the remote server.

git push -u origin main
git push
git tag "<tag>"

Discard any local changes.

git checkout -- <file>

Check the existing remote origins.

git remote -v

Further reading:

Responses (0) You can respond to this post using Webmentions.