Last active
February 25, 2022 05:40
-
-
Save iniyan455/7868274daec2b03d8b167610e79d8d48 to your computer and use it in GitHub Desktop.
Git Commands
This file contains 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
push the code | |
git branch | |
git checkout branchname | |
git status | |
git log -n1 | |
git add class name | |
git commit | |
git push origin HEAD:refs/for/q-common | |
Commit top the patch | |
git status | |
git commit --amend | |
git push origin HEAD:refs/changes/2327152 | |
//Comment oneline | |
git log --oneline -n2 | |
// To remove reset with class name all means . | |
git reset . | |
// Add to Commit | |
git add src/com/android/providers/contacts/util/VersionConfiguration.java | |
//Checkout branch | |
git checkout q-common | |
//git one branch to another branch | |
git cherry-pick -x Ic30406b7625280ddcd8f69e747deadeb1262e998 | |
git pull | |
// you want to remove last commit from git | |
git reset --hard HEAD~1 | |
//you want to unstage green to red means | |
git reset --soft HEAD~1 | |
// change branch name | |
git branch -d branchname | |
git push origin branchname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$ git mv README README.md
$ git commit -m "renamed"