Posted on 2020-05-17T00:45:41Z by Kevin Foong
This is part 2 of the Git and Github intro. See part 1 here.
If you are contributing to more than one Github account, for example one for work and one for home, you may need to set up SSH keys, one for each Github account to prevent permission denied error's and so that you don't have to keep re-entering your username and password. The below are instructions for Windows users on how you can do this.
- If you downloaded Git for Windows you will probably have “git bash” installed. Start git bash.
- Generate a ssh key
ssh-keygen -t rsa -C email@example.com
- It will ask “Enter file in which to save the key”. Save it to the below location. Ensure that you give the key some unique name (swap your values with the ones in UPPERCASE).
Read more ...
Posted on 2020-05-16T09:26:10Z by Kevin Foong
Here is a quick introduction to Git and Github for beginners. Say you have been developing locally and now want to upload your files to Github, you can follow these steps to create a repository and upload your files.
First create a new local Git repository for your project.
Next show all the files that have been amended since the last commit. If this is your first commit, it will show all files.
At this stage make sure that you have a .gitignore file in your project folder to ensure certain files and folders are ignored by Git and not sent to Github. Some examples may include the below. Once you have a .gitignore file, do git status again and you should see those files/folders omitted.
Read more ...