Skip to content

Commit

Permalink
changing all references to master branch to main
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparrow0hawk committed Nov 5, 2021
1 parent 0734181 commit 1c5b3de
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 80 deletions.
2 changes: 1 addition & 1 deletion _episodes/03-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ If you are using a different version of git than I am, then then the exact
wording of the output might be slightly different.

~~~
# On branch master
# On branch main
#
# Initial commit
#
Expand Down
32 changes: 16 additions & 16 deletions _episodes/04-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ $ git status
{: .bash}

~~~
On branch master
On branch main
Initial commit
Expand Down Expand Up @@ -111,7 +111,7 @@ $ git status
{: .bash}

~~~
On branch master
On branch main
Initial commit
Expand All @@ -134,7 +134,7 @@ $ git commit -m "Start notes on the patient inflammation project"
{: .bash}

~~~
[[master (root-commit) 40b8a94] Start notes on the patient inflammation project
[[main (root-commit) 40b8a94] Start notes on the patient inflammation project
1 file changed, 1 insertion(+)
create mode 100644 project.txt
Expand Down Expand Up @@ -166,7 +166,7 @@ $ git status
{: .bash}

~~~
On branch master
On branch main
nothing to commit, working tree clean
~~~
Expand All @@ -182,7 +182,7 @@ $ git log
{: .bash}

~~~
commit 40b8a9400329ed7324116cc9392dc8e4842d8501 (HEAD -> master)
commit 40b8a9400329ed7324116cc9392dc8e4842d8501 (HEAD -> main)
Author: Jane Smith <[email protected]>
Date: Wed Jan 3 10:34:07 2018 +0000
Expand Down Expand Up @@ -235,7 +235,7 @@ $ git status
{: .bash}

~~~
On branch master
On branch main
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
Expand Down Expand Up @@ -299,7 +299,7 @@ $ git status
{: .bash}

~~~
On branch master
On branch main
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
Expand All @@ -321,7 +321,7 @@ $ git commit -m "Add note about project responsibilities"
{: .bash}

~~~
[master 71ed26a] Add note about project responsibilities
[main 71ed26a] Add note about project responsibilities
1 file changed, 2 insertions(+)
~~~
Expand Down Expand Up @@ -452,7 +452,7 @@ $ git commit -m "Add note about extra team members"
{: .bash}

~~~
[master 005937f] Add note about extra team members
[main 005937f] Add note about extra team members
1 file changed, 1 insertion(+)
~~~
{: .output}
Expand All @@ -465,7 +465,7 @@ $ git status
{: .bash}

~~~
On branch master
On branch main
nothing to commit, working directory clean
~~~
{: .output}
Expand All @@ -478,7 +478,7 @@ $ git log
{: .bash}

~~~
commit 63f6bc6039c12ce897cf3f02bda1e95fd30fef58 (HEAD -> master)
commit 63f6bc6039c12ce897cf3f02bda1e95fd30fef58 (HEAD -> main)
Author: Jane Smith <[email protected]>
Date: Wed Jan 3 10:42:09 2018 +0000
Expand Down Expand Up @@ -532,7 +532,7 @@ Date: Wed Jan 3 10:34:07 2018 +0000
> {: .bash}
>
> ~~~
> commit 63f6bc6039c12ce897cf3f02bda1e95fd30fef58 (HEAD -> master)
> commit 63f6bc6039c12ce897cf3f02bda1e95fd30fef58 (HEAD -> main)
> Author: Jane Smith <[email protected]>
> Date: Wed Jan 3 10:42:09 2018 +0000
>
Expand All @@ -548,7 +548,7 @@ Date: Wed Jan 3 10:34:07 2018 +0000
> ~~~
> {: .bash}
> ~~~
> 63f6bc6 (HEAD -> master) Add note about extra team members
> 63f6bc6 (HEAD -> main) Add note about extra team members
> 71ed26a Add note about project responsibilities
> 40b8a94 Start notes on the patient inflammation project
> ~~~
Expand All @@ -562,7 +562,7 @@ Date: Wed Jan 3 10:34:07 2018 +0000
> ~~~
> {: .bash}
> ~~~
> * 63f6bc6 (HEAD -> master) Add note about extra team members
> * 63f6bc6 (HEAD -> main) Add note about extra team members
> * 71ed26a Add note about project responsibilities
> * 40b8a94 Start notes on the patient inflammation project
> ~~~
Expand Down Expand Up @@ -701,7 +701,7 @@ repository (`git commit`):
> > ~~~
> > {: .bash}
> > ~~~
> > [master a264d5c] Add note about what data would be useful
> > [main a264d5c] Add note about what data would be useful
> > 2 files changed, 3 insertions(+)
> > create mode 100644 analysis.txt
> > ~~~
Expand Down Expand Up @@ -741,7 +741,7 @@ repository (`git commit`):
> > ~~~
> > {: .bash}
> > ~~~
> > [master 4162a51] Update Jane's bio.
> > [main 4162a51] Update Jane's bio.
> > Author: Pete Jones <[email protected]>
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
Expand Down
6 changes: 3 additions & 3 deletions _episodes/05-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ $ git status
{: .bash}

~~~
On branch master
On branch main
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
Expand Down Expand Up @@ -271,7 +271,7 @@ $ git status
{: .bash}

~~~
# On branch master
# On branch main
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
# Changes not staged for commit:
Expand Down Expand Up @@ -305,7 +305,7 @@ $ git checkout HEAD project.txt
> to revert `project.txt` to its state after the commit `f22b25e`.
> If you forget `project.txt` in that command, Git will tell you that "You are in
> 'detached HEAD' state." In this state, you shouldn't make any changes.
> You can fix this by reattaching your head using ``git checkout master``
> You can fix this by reattaching your head using ``git checkout main``
{: .callout}
It's important to remember that
Expand Down
8 changes: 4 additions & 4 deletions _episodes/06-ignore.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $ git status
{: .bash}

~~~
On branch master
On branch main
Untracked files:
(use "git add <file>..." to include in what will be committed)
Expand Down Expand Up @@ -75,7 +75,7 @@ $ git status
{: .bash}

~~~
On branch master
On branch main
Untracked files:
(use "git add <file>..." to include in what will be committed)
Expand All @@ -98,7 +98,7 @@ $ git status
{: .bash}

~~~
# On branch master
# On branch main
nothing to commit, working directory clean
~~~
{: .output}
Expand Down Expand Up @@ -128,7 +128,7 @@ $ git status --ignored
{: .bash}

~~~
On branch master
On branch main
Ignored files:
(use "git add -f <file>..." to include in what will be committed)
Expand Down
12 changes: 6 additions & 6 deletions _episodes/07-github.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on the web rather than on someone's laptop.

Most programmers use hosting
services like [GitHub](https://github.com), [BitBucket](https://bitbucket.org) or
[GitLab](https://gitlab.com/) to hold those master copies; we'll explore the pros
[GitLab](https://gitlab.com/) to hold those main copies; we'll explore the pros
and cons of this in the final section of this lesson.

Let's start by sharing the changes we've made to our current project with the
Expand Down Expand Up @@ -109,7 +109,7 @@ Once the nickname `origin` is set up, this command will push the changes from
our local repository to the repository on GitHub:

~~~
$ git push origin master
$ git push origin main
~~~
{: .bash}

Expand All @@ -121,7 +121,7 @@ Writing objects: 100% (16/16), 1.62 KiB | 1.62 MiB/s, done.
Total 16 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4), done.
To https://github.com/ARCTraining/inflammation.git
* [new branch] master -> master
* [new branch] main -> main
~~~
{: .output}

Expand Down Expand Up @@ -180,19 +180,19 @@ Our local and remote repositories are now in this state:
> option is synonymous with the `--set-upstream-to` option for the `git branch`
> command, and is used to associate the current branch with a remote branch so
> that the `git pull` command can be used without any arguments. To do this,
> simply use `git push -u origin master` once the remote has been set up.
> simply use `git push -u origin main` once the remote has been set up.
{: .callout}
We can pull changes from the remote repository to the local one as well:
~~~
$ git pull origin master
$ git pull origin main
~~~
{: .bash}
~~~
From https://github.com/ARCTraining/inflammation
* branch master -> FETCH_HEAD
* branch main -> FETCH_HEAD
Already up-to-date.

~~~
Expand Down
22 changes: 11 additions & 11 deletions _episodes/08-collab.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ $ git commit -m "First Python analysis script"
{: .bash}

~~~
[master 6cc98ec] First Python analysis script
[main 6cc98ec] First Python analysis script
1 file changed, 2 insertions(+)
create mode 100644 code.py
~~~
Expand All @@ -78,7 +78,7 @@ create mode 100644 code.py
Then push the change to the *Owner's repository* on GitHub:

~~~
$ git push origin master
$ git push origin main
~~~
{: .bash}

Expand All @@ -89,7 +89,7 @@ Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 354 bytes | 354.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/jane/inflammation.git
9dba5e1..6cc98ec master -> master
9dba5e1..6cc98ec main -> main
~~~
{: .output}

Expand All @@ -104,7 +104,7 @@ Collaborator.
To download the Collaborator's changes from GitHub, the Owner now enters:

~~~
$ git pull origin master
$ git pull origin main
~~~
{: .bash}

Expand All @@ -114,8 +114,8 @@ remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 3 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From https://github.com/ARCTraining/inflammation
* branch master -> FETCH_HEAD
9dba5e1..6cc98ec master -> origin/master
* branch main -> FETCH_HEAD
9dba5e1..6cc98ec main -> origin/main
Updating 9dba5e1..6cc98ec
Fast-forward
code.py | 2 ++
Expand All @@ -133,10 +133,10 @@ GitHub) are back in sync.
> repository you are collaborating on, so you should `git pull` before making
> our changes. The basic collaborative workflow would be:
>
> * update your local repo with `git pull origin master`,
> * update your local repo with `git pull origin main`,
> * make your changes and stage them with `git add`,
> * commit your changes with `git commit -m`, and
> * upload the changes to GitHub with `git push origin master`
> * upload the changes to GitHub with `git push origin main`
>
> It is better to make many commits with smaller changes rather than
> of one commit with massive changes: small commits are easier to
Expand All @@ -155,14 +155,14 @@ GitHub) are back in sync.
> command line? And on GitHub?
>
> > ## Solution
> > On the command line, the Collaborator can use ```git fetch origin master```
> > On the command line, the Collaborator can use ```git fetch origin main```
> > to get the remote changes into the local repository, but without merging
> > them. Then by running ```git diff master origin/master``` the Collaborator
> > them. Then by running ```git diff main origin/main``` the Collaborator
> > will see the changes output in the terminal.
> >
> > On GitHub, the Collaborator can go to their own fork of the repository and
> > look right above the light blue latest commit bar for a gray bar saying
> > "This branch is 1 commit behind Our-Repository:master." On the far right of
> > "This branch is 1 commit behind Our-Repository:main." On the far right of
> > that gray bar is a Compare icon and link. On the Compare page the
> > Collaborator should change the base fork to their own repository, then click
> > the link in the paragraph above to "compare across forks", and finally
Expand Down
Loading

0 comments on commit 1c5b3de

Please sign in to comment.