You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git branch - to check all branches present in project
git branch <branchName> - to create new branch
git branch --d <branchName> - to delete a branch
git merge <branchName to be merge in current branch> - to merge a branch
git checkout <branchName to go inside that branch>- to change the branch
git add <fileName to be to staged> - to stage single file
git add --all OR git add. - to stage all file
git commit -m "message" - to commit all changes
git log --oneline - it prints all the commits with their commit id
git reset <commitId> - it go to given commit id and then removes all the commits after that commit( it remove all the changes made after that commit)
git revert <commitId> - it switches to just previous commit and add another required commit to that previous commit while keeping connected to latest commit