Skip to content

Commit fb8a7fb

Browse files
Merge pull request #4297 from JacquesCarette/coAuthorshipWiki
Wiki: Explain how to acknowledge co-authors.
2 parents cf783e3 + d84ff42 commit fb8a7fb

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

wiki/Contributor's-Guide.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ To maintain a clean, understandable project history and improve collaboration, p
103103
2. Update
104104
3. more edits
105105
- Of course, these messages should line up with what was actually changed
106+
- *Acknowledge your co-authors!* Each commit declares who submitted the work. For example, [130e76](https://github.com/JacquesCarette/Drasil/commit/130e76ed4246989765cf1b7440ccadb7f226df2b.patch) shows that Jason wrote the commit (see the From field). Normally, we assume that Jason wrote this code himself as well. For situations where this isn't true, such as in [8deb7c](https://github.com/JacquesCarette/Drasil/commit/8deb7caf8442b90a1fa56f1926e2d44a378230a4.patch), we should note each contributor by appending a new line in the format "Co-Authored-By: X <X's email>" to the end of the commit message. If multiple authors exist, you should append one new line in that format for each contributor.
106107
- Properly syncing with `main`
107108
- Syncing with `main` regularly can be a very good thing due to the existance of stable artifacts checked into the repo, when done correctly
108109
1. Avoid using `merge`, it results in many merge commits making the commit history very "noisy"
@@ -154,4 +155,4 @@ The internet is your friend. Back on the topic of seeking help, you will also fi
154155

155156
<!-- Add any more advice here and remove this comment when done -->
156157

157-
Sincerely, the students of Summer 2021.
158+
Sincerely, the students of Summer 2021.

wiki/Git2Know-for-Drasil.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ Making a commit to a repository
5656
```
5757
git status
5858
```
59-
2. Creating a commit. This step will actually apply your changes to your local repository. Use the following function to commit your changes (after they have been staged):
59+
2. Creating a commit. This step will actually apply your changes to your local repository. Use the following function to commit your changes (after they have been staged) with short-form messages:
6060
```bash
6161
git commit -m "meaningful message to communicate changes made"
6262
```
63+
If you'd like to write a more comprehensive, long-form commit message, running only `git commit` will open a text editor (`nano` by default) you can use. This is particularly helpful for when there are [co-contributors you need](#co-authorship) to acknowledge.
6364
3. Pushing commits to a remote repository. This will create or update an identical branch to the repository you initially `cloned` from. For others to see the changes you made, push them to remote repository by using:
6465
```
6566
git push
@@ -70,6 +71,9 @@ Making a commit to a repository
7071
```
7172
4. Pulling from the remote repository. When others make changes, `git pull` syncs your local version with any changes made to the remote repository.
7273
74+
### Co-Authorship
75+
76+
Working with others, you should always acknowledge so. Commits declare who *submitted* work (e.g., [130e76](https://github.com/JacquesCarette/Drasil/commit/130e76ed4246989765cf1b7440ccadb7f226df2b.patch) shows that Jason wrote the commit). Normally, we assume that Jason wrote this code himself as well. GitHub will similarly assume this and attribute this work to Jason through the [Contributor's Statistics](https://github.com/JacquesCarette/Drasil/graphs/contributors) page. In situations where others helped you work on a commit, you should always acknowledge them somehow. Conventionally, with git, we append a new line in the format "Co-Authored-By: X <X's email>" to the end of the commit message. If multiple authors exist, we append one new line for each contributor. For example, [8deb7c](https://github.com/JacquesCarette/Drasil/commit/8deb7caf8442b90a1fa56f1926e2d44a378230a4.patch) shows all contributors, who, as of Mon, 3 Jun 2024 contributed to the wiki.
7377
7478
## Oops, how do I undo a commit?!?
7579
One of the following commands may help if you find you made some changes to a commit that you want to revert.
@@ -81,7 +85,6 @@ One of the following commands may help if you find you made some changes to a co
8185
### I pushed it to the remote repo!
8286
- `git revert <#commitHash>` (creates inverse commit to commit #commitHash)
8387
84-
8588
## Pull Requests
8689
This is a common process for fetching the latest data from the remote repository, making some changes, and then contributing back to the remote repository. A pull request is a method for telling the owners/maintainers of a remote repo that you wish to add your changes.
8790
1. Make sure your main branch is up to date by switching to it (using `git switch main`) and using `git pull`
@@ -202,4 +205,4 @@ Follow these steps:
202205
## Avoidable Issues
203206
I’ve made changes to the code, but the program says there’s nothing to commit?
204207
- might seem obvious but don’t forget to save your changes! `CTRL+S`
205-
- or, if you are trying to change the capitalization of a file, see this [Stack Overflow page](https://stackoverflow.com/questions/10523849/changing-capitalization-of-filenames-in-git)
208+
- or, if you are trying to change the capitalization of a file, see this [Stack Overflow page](https://stackoverflow.com/questions/10523849/changing-capitalization-of-filenames-in-git)

0 commit comments

Comments
 (0)