Ensuring 'nette' has the latest changes from 'stu':
IMPORTANT! We need to make sure that everything is up to date with github BEFORE we start to make changes to ANY file in VS Code.
Open Nutty's Kitchen in VS Code (the code editor)

# Open a terminal window: Press CTRL and hold while you press ' (it's on the same key as the @ symbol)

# Open a Git Bash Terminal: Press the down arrow (next to the '+' symbol) on top right hand side of the terminal window.
Select 'Git Bash' from the pop up menu.


# Now we can run the following commands to ensure that your branch (nette) is up to date with my branch (stu):
Copy & paste the commands (shown as:
git some-command-to-run
) into the Git Bash terminal and
press ENTER to run the command.
-
Fetch the latest changes from the remote repository with the
following command:
-
git fetch origin
-
-
Check if the `stu` branch exists locally. It should be shown in the
terminal:
-
git branch --list stu
-
-
If the `stu` branch exists locally, check it out ('checkout' means
'switch to'):
-
git checkout stu
-
-
If the `stu` branch does not exist locally, create
a local copy of the remote `stu` branch:
-
git checkout -b stu origin/stu
-
Otherwise skip to step 5.
# Now we are sure the 'stu' branch exists on your pc we can proceed:
-
Pull the latest changes into the local `stu` branch with the
following command:
-
git pull origin stu
-
-
Check out (switch to) the `nette` branch with the following command:
-
git checkout nette
-
-
Merge the `stu` branch into the `nette` branch with the following
command:
-
git merge stu
-
-
Resolve any merge conflicts if they arise.
- # STOP IF THERE ARE CONFLICTS!!! and go no further. Otherwise proceed:
-
Push the updated `nette` branch to the remote repository with the
following command:
-
git push origin nette
-
### This is a shorter version of the above!!!!!
# Copy and paste these into a Git bash terminal and press 'ENTER':
git fetch origin
git branch --list stu
# If the `stu` branch exists locally it will be shown in the termiminal.
# If the `stu` branch does not exist locally copy & paste the following into the 'Git Bash' terminal & press 'Enter':
git checkout -b stu origin/stu
# Now we know the 'stu' branch definately exist on your pc, copy & paste the following into the 'Git Bash' terminal & press 'Enter':
git checkout stu
git pull origin stu
git checkout nette
git merge stu
WARNING: If there are conflicts STOP!!! Do no more, these have to be fixed!!!
# If there are no conflicts, proceed to `push` the updated local `nette` branch to the remote branch (on Git Hub)
git push origin nette
Just take note of any spurious messages in the terminal and then close each terminal with the following command:
exit
All should be good now.
Happy Coding!