You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add more examples about git add.
Clarify that Docker is optional (which is true for the time being).
Co-authored-by: Olivia Chiong <[email protected]>
Merged as agreed
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+20-11
Original file line number
Diff line number
Diff line change
@@ -76,9 +76,11 @@ You should now have a new folder called `CTI-website-frontend`.
76
76
77
77
_Note: Instead of working on a clone, you can choose to make edits on a fork. To view the previous instructions on how to do that, look at [the version of this document dated Jan 14, 2021](https://github.com/civictechindex/CTI-website-frontend/blob/c4320bc33f6eada97bf3f404d240cac382ee7552/CONTRIBUTING.md)._
78
78
79
-
## Step 4: Setting up Docker
79
+
## Step 4: Setting up Docker (Optional)
80
80
81
-
Docker is the recommended approach to quickly getting started with local development. (Docker helps create a local/offline version of the `CTI-website-frontend` website on your computer so you can test out your code before submitting a pull request.)
81
+
Docker will soon be the recommended approach to quickly getting started with local development, but this step is optional for now, and most devs are not using Docker.
82
+
83
+
Docker is a tool that can help create a local/offline version of the `CTI-website-frontend` website on your computer so you can test out your code before submitting a pull request.
82
84
83
85
The recommended installation method is [Docker Desktop](https://docs.docker.com/get-docker/) for Windows 10 64-bit and Mac. Linux users may check out [Docker Engine](https://docs.docker.com/engine/install/) instead.
84
86
@@ -102,7 +104,7 @@ In browser go to [localhost:80](localhost:80)
102
104
103
105
Create a new branch for each issue you work on. Doing all your work on topic branches leaves the repository's main branch (named `main`) unmodified.
104
106
105
-
a) Check current branch
107
+
### a) Check current branch
106
108
107
109
The `git branch` command will let you know what branch you are in, and what branch names are already in use.
108
110
@@ -112,7 +114,7 @@ git branch
112
114
113
115
You will see a list of all of your branches. There will be a star (`*`) next to the branch that you are currently in. By default you should start on the `main` branch.
114
116
115
-
b) Create a new branch where you will work on your issue
117
+
### b) Create a new branch where you will work on your issue
116
118
117
119
The `git checkout` command will create and change to a new branch where you will do the work on your issue. In git, the checkout command lets you navigate between different branches. Using the `-b` flag you can create a new branch and immediately switch into it.
118
120
@@ -130,28 +132,35 @@ No law of physics will break if you don't adhere to this scheme, but laws of git
130
132
131
133
When you've finished working on your issue, follow the steps below to prepare your changes to push to GitHub.
132
134
133
-
c) Prepare your changes to push to the repository
135
+
### c) Prepare your changes to push to the repository
134
136
135
137
Once you are done with the work on your issue you will push it to GitHub. Before you can push your work, you will stage and commit your changes. These two commands are similar to the save command that you have used to in other programs.
136
138
137
-
-Use the `git add` command to stage your changes.
138
-
This command prepares your changes before you commit them. You can stage files one at a time using the filename, or you can use the `.` to stage all of the files that you have added or made changes to.
139
+
#### Use the `git add` command to stage your changes
140
+
141
+
This command prepares your changes before you commit them. You can stage files one at a time using the filename, or many at a time using wildcards, or you can use the `.` to stage all of the files that you have added or made changes to. For more information on `git add`, see <https://github.com/git-guides/git-add>.
142
+
143
+
To stage changes to a specific file, run the command:
144
+
145
+
```bash
146
+
git add path/to/file/you/just/edited.js
147
+
```
139
148
140
-
Run the command:
149
+
To stage all of the changes in your folder, run the command:
141
150
142
151
```bash
143
152
git add .
144
153
```
145
154
146
-
-Use the `git status` command to see what files are staged.
155
+
#### Use the `git status` command to see what files are staged
147
156
148
157
This command will list the files that have been staged. These are the files that will be committed (saved) when you run the next command, `git commit`.
149
158
150
159
```bash
151
160
git status
152
161
```
153
162
154
-
-Use the `git commit` command
163
+
#### Use the `git commit` command
155
164
156
165
This command saves your work, and prepares it to push to GitHub. Use the `-m` flag to quickly add a message to your commit. Your message should be a short description of the issue you are working. It will be extremely helpful if other people can understand your message, so try to resist the temptation to be overly cryptic.
157
166
@@ -161,7 +170,7 @@ To commit your changes with a message, run:
161
170
git commit -m 'insert message here'
162
171
```
163
172
164
-
Congratulations! You are now ready to push your work to GitHub.
173
+
### d) Congratulations! You are now ready to push your work to GitHub
0 commit comments