Skip to content

Instantly share code, notes, and snippets.

View iLakshya's full-sized avatar
Busy

Lakshya Goel iLakshya

Busy
View GitHub Profile
@iLakshya
iLakshya / BasicCommands.txt
Created October 10, 2022 07:47
GitHub Basic Commands
git init // initialise the GitHub in local repository
git remote add origin "url link" // adds your repository using the link of the repo in your GitHub
git status // checks the GitHub status (or what's the status of the branch)
git branch -m oldbranchname newbranchname // changes the old branch name to new brnach name
git status // checks the GitHub status (or what's the status of the branch)
git fetch // primary command used to download contents from a remote repository
git pull origin main // used to fetch and download content from a remote repository and immediately update the local repository to match that content
git branch --set-upstream-to=origin/main // used to set track the branch with the 'main'
git status // checks the GitHub status (or what