Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
9 views2 pages

Expt 5a

A new branch 'feature-branch' was created and an initial version of 'sample.txt' was added and committed. The file was later updated with more details and committed again. The changes from 'feature-branch' were then cherry-picked into the 'main-branch'.

Uploaded by

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

Expt 5a

A new branch 'feature-branch' was created and an initial version of 'sample.txt' was added and committed. The file was later updated with more details and committed again. The changes from 'feature-branch' were then cherry-picked into the 'main-branch'.

Uploaded by

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

Prajna U R@LAPTOP-6JIMD0NS

MINGW64 ~ (main-branch)
$ git checkout -b feature-branch
Switched to a new branch 'feature-branch'

Prajna U R@LAPTOP-6JIMD0NS MINGW64 ~ (feature-branch)


$ echo "This is the first version of the file." > sample.txt

Prajna U R@LAPTOP-6JIMD0NS MINGW64 ~ (feature-branch)


$ git add sample.txt
warning: in the working copy of 'sample.txt', LF will be replaced by CRLF the next
time Git touches it

Prajna U R@LAPTOP-6JIMD0NS MINGW64 ~ (feature-branch)


$ git commit -m "Add initial version of sample.txt"
[feature-branch dbd48be] Add initial version of sample.txt
1 file changed, 1 insertion(+)
create mode 100644 sample.txt

Prajna U R@LAPTOP-6JIMD0NS MINGW64 ~ (feature-branch)


$ echo "This is the second version with more details." >> sample.txt

Prajna U R@LAPTOP-6JIMD0NS MINGW64 ~ (feature-branch)


$ git add sample.txt
warning: in the working copy of 'sample.txt', LF will be replaced by CRLF the next
time Git touches it

Prajna U R@LAPTOP-6JIMD0NS MINGW64 ~ (feature-branch)


$ git commit -m "Update sample.txt with more details"
[feature-branch 7e2a06e] Update sample.txt with more details
1 file changed, 1 insertion(+)

Prajna U R@LAPTOP-6JIMD0NS MINGW64 ~ (feature-branch)


$ git checkout main-branch
Switched to branch 'main-branch'

Prajna U R@LAPTOP-6JIMD0NS MINGW64 ~ (main-branch)


$ git log feature-branch --oneline
7e2a06e (feature-branch) Update sample.txt with more details
dbd48be Add initial version of sample.txt
8ae329a (HEAD -> main-branch) Normalize line endings
d334e74 (source-brsnch, new-branch, master) Improve Feature A
58e3ff2 Add Feature A
70e0ff2 Initial commit

Prajna U R@LAPTOP-6JIMD0NS MINGW64 ~ (main-branch)


$ git cherry-pick dbd48be^..7e2a06e
[main-branch 9133ec7] Add initial version of sample.txt
Date: Tue May 6 13:33:46 2025 +0530
1 file changed, 1 insertion(+)
create mode 100644 sample.txt
[main-branch 23fb360] Update sample.txt with more details
Date: Tue May 6 13:35:35 2025 +0530
1 file changed, 1 insertion(+)

Prajna U R@LAPTOP-6JIMD0NS MINGW64 ~ (main-branch)

You might also like