Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Adding ssh keys can be done in the settings of your GitHub account (top right button on GitHub) and in the settings menu there is a "SSH and PGP keys" section.

 

Check if you already have an ssh key by checking if the following file exists: ~/.ssh/id_rsa.pub

If yes, create a new ssh key on GitHub and copy the content of ~/.ssh/id_rsa.pub to the Key section.

if If you don't already have a ssh key, create a new one with the following command

...

Code Block
languagebash
themeEmacs
git commit -a -m "commit message"

 

 Push commits upstream

After committing the changes into the local repository they have to be pushed upstream to make them available for the other developers.

Code Block
languagebash
themeEmacs
git push origin master


This can fail if If upstream is ahead of your you local version. In this case you first have to get the most recent changes from upstream:

Code Block
languagebash
themeEmacs
git fetch origin 
git rebase -p origin

if

git rebase --skip ignores local change

...

More information https://www.derekgourlay.com/blog/git-when-to-merge-vs-when-to-rebase/

...

git push origin "branch name"