If you are working for automation, GIT is the most important topic. GIT is a open source distributed version control system used to push your code to version controls like GITHUB, BitBucket etc (repository hosting services).
The most commonly used commands are described here:
The most commonly used commands are described here:
Initialize a new local repository
To set new name to git
To set new email to git
Cloning a default branch from remote repository
Cloning a different branch from remote repository
Creating a new branch in the local repository
Adding a modified file to local repository
Adding all the modified files to local repository
Committing changes
Push the changes to remote repository
When you have online repository but no master branch:
I could see most of the people complaining that they have a repository in BitBucket/Github but they do not have a master branch. In this case, you can follow the below-mentioned process.
- Clone the repository to your local
- Check out a new branch with the branch name as master.
- Then add all changes.
- Now commit your changes and push the code.
- It will be merged automatically. Now your master branch is ready and from here you can follow the normal process.
- If the master branch is not merged, you can merge it.
- Please note that this is a one-time process and it should be done only if the master branch is not present in the version control.
GIT Process if there is no master branch present in version control for a specific project