GitHub
Set up GitHub on your local Linux machine to work from the command line.
Requirements⚓︎
- A Linux client
- A GitHub account
Sources⚓︎
Guide⚓︎
This is a quick summary of Get started by GitHub. It's aim is to help you start working with a GitHub repo ASAP, not to explain Git in great detail.
I highly recommend reading About Git and Hello World.
GitHub CLI
GitHub CLI offers additional functionalities for interaction with GitHub (e.g. Issues). I do not use it at this time. However, it is required to authenticate in order to sync with GitHub repos.
Setup⚓︎
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
Visual Studio Code
VSCode's UI allows you to do everything we'll do here. It should also detect that you're using Git if you open the associated folder and offer Git actions in the third left menu.
To associate with VSCode, use the following magic:
Cloning a repo⚓︎
- Go to GitHub, open the wanted repository and click on the green
<> Codebutton. - Select
HTTPSand copy the URL. - Return to your terminal, navigate to the folder you want your repo to appear and enter the clone directive:
Working with changes⚓︎
Interacting with the remote repo⚓︎
non-fast-forward error
If your local copy is behind the remote, you won't be able to push your changes.
In order for it to work, git pull first.