Git

This is a guide to git commands, but also includes a bit of dos commands as well to help navigate.

The first thing we need to do is to navigate to where we want to create the folder:

cd /file/path/to/code

Then create the folder, in this case the folder will be called FolderName:

mkdir FolderName

Then we can intiatiate it as git repostiroy with the command:

git init

When we have updated a file in this folder and we want to ‘push’ it to the git repository we use the add command, that puts it in a staging area ready to be pushed:

git add fileName.txt

Then we commit them to the LOCAL repository, they have not yet been uploaded but the changes have been recorded:

git commit -m "Message to commit"

Now you may wish to upload it somewhere, typically github. Here is how it is done:

git push <remote_URL/remote_name> <branch>

git push https://github.com/justinlross/PDF-Bot.git main

git remote add origin git@github.com:user/repo.git

References

https://docs.github.com/en/github/getting-started-with-github/create-a-repo

http://guides.beanstalkapp.com/version-control/common-git-commands.html

https://www.atlassian.com/git/tutorials/setting-up-a-repository