Tech Thursday Assignment - 16-08-2025 #1
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Git Assignment - 16-08-2025
Create Repository in Organization
Assignment:
git-practice-<your_name>
).GIT_ASSIGNMENT.md
with a screenshot showing the repo inside the organization.1. What is Git and Version Control
Assignment:
2. Installing Git & Configuring User Info
Assignment:
Install Git (if not already installed).
Run:
Verify with:
3. Initializing a Repository
Assignment:
Create a new folder
git-practice-<<your_name>>
.Inside, run:
Verify that a
.git
folder is created.Run
git status
and note the message (it should say “No commits yet”).4. Working Directory, Staging, and Commits
Assignment:
In
git-practice-<<your_name>>
, create a filenotes.txt
.Run:
Observe which area (untracked → staged → committed) the file is in as you do:
Write down how the status changed after each command.
5. Adding & Committing Files
Assignment:
todo.txt
.todo.txt
, then commit the change again.git log --oneline
to see both commits.6. Viewing Commit Logs & Diffs
Assignment:
Run:
Edit
notes.txt
and check the changes withgit diff
before staging.Stage and commit, then run
git diff commit1 commit2
to see what changed between commits.7. Creating & Switching Branches
Assignment:
Create a branch
feature/feature-1
:Add a line to
notes.txt
and commit it.Switch back to
main
:Observe how the file content changes.
8. Cloning a Remote Repository
Assignment:
Go to Git Comorin and verify your repo in Git-Training-Hub exists.
Run:
Verify by listing files inside
cloned-repo
.9. Adding & Managing Remotes
Assignment:
In your original
git-practice-<<your_name>>
repo, add a remote:Verify the remote shows correctly.
10. Pushing & Pulling Changes
Assignment:
Push local commits to Git Comorin:
Edit a file directly on Git Comorin and commit it there.
In your local repo, run:
Verify that the local file updates.
11. Ignoring Files with .gitignore
Assignment:
In your repo, create a file
secret.txt
.Create
.gitignore
and add:Run
git status
→ confirmsecret.txt
is ignored.Commit the
.gitignore
file.Final Assignment Summary
.gitignore
file to exclude something.GIT_ASSIGNMENT.md
with screenshots of key commands and the repository inside the organization.