0% found this document useful (0 votes)
109 views

Branch and Merge Conflict

The document shows the steps taken to create two feature branches called feature1 and feature2 from the master branch. Code and commit messages were added to each feature branch separately. The feature branches were then merged back into the master branch one by one. Finally, the feature branches were deleted and a separate quotes directory was initialized, committed and pushed to a remote repository.

Uploaded by

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

Branch and Merge Conflict

The document shows the steps taken to create two feature branches called feature1 and feature2 from the master branch. Code and commit messages were added to each feature branch separately. The feature branches were then merged back into the master branch one by one. Finally, the feature branches were deleted and a separate quotes directory was initialized, committed and pushed to a remote repository.

Uploaded by

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

cd test

git branch -b feature1


git checkout -b feature1
git checkout master
git checkout -b feature2
git checkout feature1
/*
Inside test hello.py
print('hello people')
*/
git add hello.py
git commit -m "hi"
git checkout master
git merge feature1
git checkout feature2
/*
Inside test hello.py
print('keep playing')
*/
git add hello.py
git commit -m "hello"
git checkout master
git merge feature2
/*
Inside test hello.py
print ('keep playing')
*/
git add hello.py
git commit -m "hello"
git branch -d feature1
git branch -d feature2
cd ../quotes
/*
quotes Quotes.txt
My Life is my message. Mahatma Gandhi
*/
git add Quotes.txt
git commit -m "Quotes commit"
git pull ../.assessment/remote/ master --allow-unrelated-histories
git checkout --ours Quotes.txt
git add .
git commit -m "git last commit'
git push ../.assessment/remote/ master

You might also like