Git - Duplicate repository
Git is useful for backup up your project files and for sharing with others.
For now, we will only concentrate on copying a repository from one Github account to your own Github account. We will then clone your Github repository into your local drive. This repository contains all the project codes needed for your robot. It also contains records of all the changes you made to the project.
Note there are many ways to do this and this is most likely not the best way.
The instructions here are based on this website, https://www.jcchouinard.com/clone-github-repository-on-windows/
If you are new to Git, the git-scm website is a good place to start, with a popular online book, Getting Started videos and cheat sheets.
There are three main ways to use Git.
Command line (Good to know a bit to appreciate Git)
Git GUI client like GitHub Desktop, Sourcetree (Do not need to remember commands)
Build in support in IDE like Visual Studio Code. Refer to this site for more details.
You should at least watch this video tutorial for Git.
Installing Git Software
Go to https://git-scm.com/download/win and download the 64 bit standalone installer for Windows. Once installed, you will be able to run Git commands in Windows Command prompt
Go to https://desktop.github.com/ and download the Github desktop. This is a Git Gui app that makes using Git easier.
Duplicate a Repository
In this example here, we are duplicating a source repository, https://github.com/ngbengkiat/WSS2023, to a new repository in your Github account
Steps to duplicate a repository
Step 1: Login to your Github (Create an account first if necessary)
Step 2: Create a new repository, say, myWSS
Step 3: Use browser to open source repository, https://github.com/ngbengkiat/WSS2023
Step 4: Click on “Code” and copy the URL.
Step 5: Open Windows command. Change directory to a convenient folder. (say D:\WSS>)
Step 6: Create a bare clone of the source repository.
D:\WSS> git clone --bare https://github.com/ngbengkiat/WSS2023.git
Step 7: Push a Mirror to the new repository.
D:\WSS> cd WSS2023.git
D:\WSS\WSS2023.git> git push --mirror https://github.com/yourusername/myWSS.git
Step 8: Use file explorer to remove the temporary local repository you created in step 1.
You can go to your Github account that check that myWSS repository has the same content as https://github.com/ngbengkiat/WSS2023.git
Step 8: Clone your new myWSS repository into your local drive directory, say, D:\WSS
D:\WSS> git clone https://github.com/yourusername/myWSS.git
Open the project workspace in Visual Code.
The repository you duplicated is the project workspace.
Start Visual Code
Select File->Open Folder...
Navigate to the repository you duplicated
Build the project
Note that whatever you changed in this workspace, you can save to your own repository (Not mine).