Unverified Commit f1291d38 authored by stephen scott tucker's avatar stephen scott tucker Committed by GitHub
Browse files

Update info about shared libraries

parent 42793fa4
Loading
Loading
Loading
Loading
+4 −31
Original line number Diff line number Diff line
@@ -12,26 +12,20 @@ A fork is a complete copy of a repository. Regular contributors should maintain

To create a fork, click the Fork button on the top right of the repository page.

If you intend to contribute to Homer3's submodules, repeat this process for these repositories as well.

## Cloning your fork of Homer3

To clone the repository is to download the *remote* repository (the code hosted on GitHub) to your local machine.

To clone Homer3 along with all its submodules, use

```shell
git clone https://github.com/<your username>/Homer3 --recurse-submodules
git clone https://github.com/<your username>/Homer3
```

A simple `git clone` without the `--recurse-submodules` parameter WILL NOT download the associated submodules, nor using the Download button on the repository webpage.

### Switching to the working branch

 If you intend to edit a single branch of your fork, a convenient parameter is `--single-branch`:

 ```shell
git clone https://github.com/<your username>/Homer3 --recurse-submodules --single-branch -b <working branch name>
git clone https://github.com/<your username>/Homer3 --single-branch -b <working branch name>
```

Otherwise, `checkout` the working branch:
@@ -41,26 +35,7 @@ git checkout <working branch name>

### Submodule management

You will also need to switch to the fork and branch of the submodule you wish to make changes to.

To change the remote repository associated with each submodule, edit the contents of `Homer3\.gitmodules` or use:
```shell
git config --file=.gitmodules submodule.<name of submodule>.url <url of your fork>
```
and then call
```shell
git submodule sync
```
To confirm that the submodules are now part of your branch:
 ```shell
 cd <name of submodule>
git status
```
The submodule should be treated as its own repository from this point o\



nward. For the remainder of the tutorial, remember that each section must be repeated within the submodules up until the point at which pull requests are created. **Do not commit your changes to `.gitmodules`**.
See [CONTRIBUTING.md/Shared Libraries](https://github.com/BUNPC/Homer3/blob/master/.github/CONTRIBUTING.md#shared-libraries)

## Syncing your fork with the BUNPC repository

@@ -76,7 +51,7 @@ git remote -v

Now you can sync the working branch of your local repository with the current state of the branch you ultimately want to contribute to, such as BUNPC/development:
```shell
git pull bunpc development --recurse-submodules
git pull bunpc development
```

This will fetch and merge the remote branch `development` from the BUNPC respository. If problems arise, you will have to resolve the merge conflicts manually. Resolving conflicts is [possible via the Git command line interface](https://docs.github.com/en/github/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line), but made easier with graphical utilities such as [GitHub Desktop](https://desktop.github.com/), [Visual Studio Code](https://code.visualstudio.com/), or [TortoiseSVN](https://tortoisesvn.net/).
@@ -109,8 +84,6 @@ Once changes have been staged, commit them using
git commit -m <description of the changes being committed>
```

To commit files to a submodule, change directories to the submodule and repeat the process of adding files and committing changes.

> Note: take care not to accidentally add log files, configuration files like AppSettings.cfg, or generated data such as Registry.mat to your commits.

To push your commits to your remote fork: