Repository files navigation
git init
git status
git add README.md
git commit -m "Initial Commit"
git branch -M main
git remote add origin https://
git push -u origin main
git checkout -b feature-1 # This will create a new branch
git checkout main # This will switch to an already existing branch
git checkout feature-1 # Again switching back to the feature-1 branch
git diff # Shows the difference
git merge main #
Delete a branch named feature-1
git branch -d feature-1
Undo a stage file back to unstaged state
git reset
Undo a commit locally and point to previous commit
git reset HEAD~1
Undo a commit locally and point to previous commit
git reset HEAD~2
Restore to a previous commit based on Hash
git reset 64d9bd8f87704b3e5a88ba14e93ed21b6113b10a
Hard reset to a previous commit
git reset --hard 64d9bd8f87704b3e5a88ba14e93ed21b6113b10a
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.