Basics of Git for a QA Engineer
Git is a free, open-source, distributed version control system designed to handle projects of all sizes quickly and efficiently, from small to large projects.
Install git if not present in your system. Just download and install.
git — version. You should be able to see the version.
Create a remote repository on Github, Gitlab, Bitbucket, or anywhere on your favorite Version controller.
github.com
gitlab.com

- git init -> To initialize git in a folder
git remote add origin https://github.com/shivanandmishra14/english-framework.git
To clone/copy all the files and folders present in the mentioned location.
- git add . -> To add the script files on git to commit.
- git commit -m “sample_test_case” -> Confirming and committing the
- git push -> push from current branch
- git checkout master -> To switch control to master branch.
- git branch new branch -> To create new branch
- git checkout dev1 -> To switch control to dev1 branch
- git status -> To show on which branch the Ide control is in
changes made in the script files.
- git pull -> To pull the recently committed code
- Git stash -> save without change
- git stash apply → to apply locally saved changes
- Git pull origin master -> Pull code from master
- git fetch -> a primary command used to download contents from a remote
git push -u origin master
to push in master
Merge with master:
git checkout mastergit merge dev1git push -u origin master
git branch -d Yourbranch → to delete your local branch
git push remotRepoName -d remoteBranchName → To delete Remote branch name
git log -> To check logs
git revert Commit id ->To revert your last pushed code
Post rever use git push to publish earlier changes