Skip to content

Instantly share code, notes, and snippets.

@Kumawatlalit912
Last active April 6, 2023 18:27
Show Gist options
  • Save Kumawatlalit912/a141cb5ea03cf5d02c7c3f2902357825 to your computer and use it in GitHub Desktop.
Save Kumawatlalit912/a141cb5ea03cf5d02c7c3f2902357825 to your computer and use it in GitHub Desktop.
includes important commands for git bash
git remote set-url origin https://<githubToken>@github.com/kumawatlalit007/ProductionCode.git --->(for new user)
git remote
git remote -v
//to remove the origin
git remote remove origin
git init
git add . ("for all files")
git add ("file_name")
git commit -m "first-commit"
git remote add origin repo_url
git checkout -b main ("to change branch")
git push -u origin main "or" git push -f origin main
git log
git status
"to revert back the commits"
git reset --soft HEAD@{1}
git merge ("to merge into another branch")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment