Matt
@Matt
366
Posts
188
Profile views
0
Followers
0
Following
Posts made by Matt
-
RE: How to...
How to clone a public GitHub repository with VS Code and push it to a private GitHub repository.
- Make sure Git is installed
- Open VS Code and use the source control icon on the far left to clone a git repository to a local folder
Open a terminal in VS Code (View>terminal)
PS C:\Users\github> cd sarek PS C:\Users\github\sarek> git remote remove origin PS C:\Users\github\sarek> git remote add origin https://github.com/ink-blot/sarek.git PS C:\Users\github\sarek> git branch * master PS C:\Users\github\sarek> git push -u origin master
If it doesn't promptly start pushing, an authorisation screen should (eventually) appear (it may take a few minutes).
The token method is preferred:
- Go to your GitHub account settings: GitHub Token Settings.
- Click Generate new token (classic).
- Select the scopes you need (e.g., repo for private repositories).
- Generate the token and copy it (you won’t be able to see it again later).
- In the GitHub sign-in window, switch to the Token tab.
- Paste the generated token into the input field and confirm.
Optional steps if you want to fetch updates from the original nf-core/sarek repository in the future, add it as an upstream remote:
PS C:\Users\github\sarek> git remote add upstream https://github.com/nf-core/sarek.git PS C:\Users\github\sarek> git fetch upstream PS C:\Users\github\sarek> git merge upstream/main