[go: up one dir, main page]

0% found this document useful (0 votes)
15 views4 pages

DevOPS Lab8

Uploaded by

bslsdevi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views4 pages

DevOPS Lab8

Uploaded by

bslsdevi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Lab – 8

Aim: Creating Branches and handling PUSH and PULL requests in GIT-HUB
Description:
A branch is a version of the repository that diverges from the main working project. It is a feature
available in most modern version control systems. A GIT project can have more than one branch. These
branches are a pointer to a snapshot of your changes. The master branch is a default branch in GIT. It is
instantiated when first commit made on the project. When you make the first commit, you're given a
master branch to the starting commit point.
The git branch command allows you to create, list, rename and delete branches. Many operations on
branches are applied by git checkout and git merge command. So, the git branch is tightly integrated with
the git checkout and git merge commands.
Commands:
1. git branch <branch name> //Creates a branch under master

2. git branch --list (or) git branch // shows all the branches under master

3. git branch -d<branch name> // used to delete specific branch

4. git push origin -delete <branch name> // to delete a remote branch in GIT-HUB from desktop

5. git checkout<branch name> // switching between branches from master branch

6. git branch -m master // to switch to branch master from any level of branch

Dr B.V. Rama Krishna Associate Professor (CSE)


7. git branch -m <old branch name><new branch name> // renaming the specific branch

8. git merge <branch name> // merging two branches

Dr B.V. Rama Krishna Associate Professor (CSE)


Dr B.V. Rama Krishna Associate Professor (CSE)
Dr B.V. Rama Krishna Associate Professor (CSE)

You might also like