Last active
April 6, 2023 18:27
-
-
Save Kumawatlalit912/a141cb5ea03cf5d02c7c3f2902357825 to your computer and use it in GitHub Desktop.
includes important commands for git bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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