Skip to content

Commit

Permalink
Update git_collaboration.md
Browse files Browse the repository at this point in the history
  • Loading branch information
memcmahon authored Feb 10, 2025
1 parent ea3a684 commit 16dc1a4
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions module1/lessons/git_collaboration.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ Pick one person to create the repo. The other person should be watching and advi
</section>

<section class="dropdown">
### Git Commands
### Helpful Git and Terminal Commands
- **Make a new directory**
- `mkdir [name-of-directory]`
- **Change directories**
- `cd [name-of-directory]`
- **Create a new file**
- `touch README.md`
- `touch main.js`
- `touch runner.rb`
- //etc.
</section>

Expand All @@ -55,6 +55,9 @@ To make your local machine’s git default to branch main, you’ll first need
Then you have to tell git what the default branch should be. You can run this command in your terminal to do that:

`git config --global init.defaultBranch main`

You can confirm this (or any other git config settings) by listing them all with:
`git config --list`
</section>


Expand All @@ -81,18 +84,18 @@ Then you have to tell git what the default branch should be. You can run this co
</section>

<section class="dropdown">
### Git Commands
### Helpful Git Commands
- **Clone a repo**
- `git clone [email protected]:username/repo-name.git`
- This link is found on the repo page under the green "Code" button
- This SSH link is found on the repo page under the green "Code" button
- **Create a new branch**
- `git checkout -b feature/name-of-feature-branch`
- `git checkout -b name-of-feature-branch`
- **Add a file to staging**
- `git add README.md`
- **Commit a file (with a message)**
- `git commit -m "description of work here"`
- **Push changes**
- `git push origin feature/name-of-feature-branch`
- `git push origin name-of-feature-branch`
</section>

<section class="note">
Expand Down

0 comments on commit 16dc1a4

Please sign in to comment.