Report Git Final
Report Git Final
Lab Record
On
BACHELOR OF ENGINEERING
IN
Computer Science & Engineering (Data Science)
SAHYADRI
College of Engineering & Management
An Autonomous Institution
Mangaluru – 575 007
2023-2024
1. Initialize a new Git repository in a directory. Create a new file and add it to the staging area
and commit the changes with an appropriate commit message.
• Commit the text file using a commit message using the command git commit -m
“first commit”
• Push the text file into your git repository using the command
“git push origin main”
• To rebase your local branch onto the updated remote branch use command
“git rebase origin/feature-branch”
• Commit the text file using a commit message using the command git commit -m
“first commit”
• Push the text file into your git repository using the command
“git push origin main”
• Commit the text file using a commit message using the command git commit -m
“Second commit”
• Push the text file into your git repository using the command
“git push origin main”
• Commit the text file using a commit message using the command git commit -m
“third commit”
• Push the text file into your git repository using the command
“git push origin main”
• To creates a branch Version1 with v1.0 tag use command
“git checkout -b Version1 v1.0”
• Commit the text file using a commit message using the command git commit -m
“first commit”
• Push the text file into your git repository using the command
“git push origin main”
• To cherrypick the commits from source-branch to main branch use the command
“git cherry-pick second branch~2..source-branch”
• “git add ”
• Push the changes in the source branch using the command
“git push origin source-branch”
• Commit the text file using a commit message using the command git
commit -m “first commit”
• Push the text file into your git repository using the command
“git push ”
• Create 4 more files f2.txt ,f3.txt ,f4.txt ,f5.txt and repeat the same steps.
• Use command “git log” to find your commit id.
• To view the details of that specific commit,including the author, date, and commit
message use the command “git show <commit_id>”
• To list all commits made between "2024- 01-01" & "2024-12-31 use the
command
“git log --author="Apoorva-Kamat" --since="2024-01-01" --until="2024-12-31" ”
• To display the last five commits in the repository's history use command
“git log -n 5”