From c9f022865f548dcc85a009312349a5d1721e65e1 Mon Sep 17 00:00:00 2001 From: pauline Date: Thu, 20 Nov 2025 20:54:59 +0000 Subject: [PATCH 1/3] add learningREADME.md - my understanding so far --- LearningREADME.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 LearningREADME.md diff --git a/LearningREADME.md b/LearningREADME.md new file mode 100644 index 0000000..4b5ba1c --- /dev/null +++ b/LearningREADME.md @@ -0,0 +1,43 @@ +# :bomb: Git Learning Notes + +### What I understand so far: + +#### Branching + +- Creating and switching to a branch + +``` +git switch -c feature-name +``` + +- Checking branches + +``` +git branch +``` + +Staging and Committing + +- Stage files + +``` +git add . +``` + +- Commmit with a message: + +``` +git commit -m "your message" +``` + +-- Pushing and Pulling + +- Push a branch `git push -u origin your-branch-name` + +- Pull a branch `git pull` + +--Basic Concepts + +- A branch is a timeline of work +- main (or master) is the default branch +- Staging area = "What I'm preparing to commit" From 99d2837a8ccf2c0af5ad598b854392f51650bb38 Mon Sep 17 00:00:00 2001 From: pauline Date: Thu, 20 Nov 2025 21:04:56 +0000 Subject: [PATCH 2/3] added commands I want to practice --- LearningREADME.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/LearningREADME.md b/LearningREADME.md index 4b5ba1c..1b10411 100644 --- a/LearningREADME.md +++ b/LearningREADME.md @@ -41,3 +41,38 @@ git commit -m "your message" - A branch is a timeline of work - main (or master) is the default branch - Staging area = "What I'm preparing to commit" + +### Things I'm still confused about: + +--When to use `checkout` vs `switch` + +- `switch` and `restore` are newer, but `checout` still works + +- some tutorials mix them up + +* Merge vs Rebase + +- What's the practical difference? +- When should I rebase instead of merge? + +HEAD Pointer + +- I get that it points to where I am ..but how does it move exactly + +* U ndoing Mistakes + +- git revert vs git reset +- Hard reset vs soft reset +- Which one is safe? + +-- Tracking Remote Branches + +- Why do I sometimes nee `-u` with `git push`? + +Commands I want to practice + +`git merge` +`git rebase` +`git reset --soft, --mixed, --hard` +`git stash` +`git log --oneline --graph --decorate` From 87244540ed9009424bf7c2573a46c273179b27e0 Mon Sep 17 00:00:00 2001 From: pauline Date: Thu, 20 Nov 2025 21:18:40 +0000 Subject: [PATCH 3/3] added styling --- LearningREADME.md | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/LearningREADME.md b/LearningREADME.md index 1b10411..5c26522 100644 --- a/LearningREADME.md +++ b/LearningREADME.md @@ -1,8 +1,8 @@ -# :bomb: Git Learning Notes +# :brain: Git Learning Notes -### What I understand so far: +### βœ… What I understand so far: -#### Branching +#### 🌳 Branching - Creating and switching to a branch @@ -16,12 +16,12 @@ git switch -c feature-name git branch ``` -Staging and Committing +### πŸ“¦ Staging and Committing - Stage files ``` -git add . +git add . ``` - Commmit with a message: @@ -30,49 +30,54 @@ git add . git commit -m "your message" ``` --- Pushing and Pulling +### πŸš€ Pushing and Pulling - Push a branch `git push -u origin your-branch-name` - Pull a branch `git pull` ---Basic Concepts +-- πŸ’― Basic Concepts - A branch is a timeline of work - main (or master) is the default branch - Staging area = "What I'm preparing to commit" -### Things I'm still confused about: +### πŸ˜΅β€πŸ’« Things I'm still confused about: ---When to use `checkout` vs `switch` +--When to use πŸ”€ `checkout` vs `switch` - `switch` and `restore` are newer, but `checout` still works - some tutorials mix them up -* Merge vs Rebase +* ↖️ Merge vs Rebase - What's the practical difference? - When should I rebase instead of merge? -HEAD Pointer +🎯 HEAD Pointer - I get that it points to where I am ..but how does it move exactly -* U ndoing Mistakes +* βͺUndoing Mistakes - git revert vs git reset - Hard reset vs soft reset - Which one is safe? --- Tracking Remote Branches +--🌐 Tracking Remote Branches - Why do I sometimes nee `-u` with `git push`? -Commands I want to practice +πŸ§ͺ Commands I want to practice `git merge` `git rebase` `git reset --soft, --mixed, --hard` `git stash` `git log --oneline --graph --decorate` + +## ❓ Additional info + +- Why does Git sometimes say a branch is "ahead" or "behind"? +- Whats a **detached HEAD** and what does that even mean?