Skip to content
mwetter edited this page Mar 7, 2013 · 3 revisions

Make changes on your own fork

To fork the main branch to your own repository, make changes there, and issue a pull request, proceed as follows:

First, on the web interface, press Fork to fork the repository to your account. Next, run

git clone https://github.com/YOUR_LOGIN/sandbox.git
# Make some changes
sandbox/
# Add a remote upstream so that you can get changes from the master
git remote add upstream https://github.com/lbl-srg/sandbox.git
# Fetch upstream changes, without changing local files
git fetch upstream
emacs README.md
git commit -m "Made changes to README.md" README.md
# Merge the changes from the upstream master (the main repo) with your local files
git merge upstream/master
# Push the changes to your repository
git push

Finally, on the web interface of your account, issue a Pull Request so that the changes are merged to the master.

Make changes on the master of the main repository

To check out the main branch, change the README.md file, and upload the change, run

git clone https://github.com/lbl-srg/sandbox.git
cd sandbox/
emacs README.md
git commit -m "Changed readme" README.md
git push

Add a bug fix on the release branch

To add a bug fix to a release branch, proceed as follows:

# Clone repository
git clone https://github.com/lbl-srg/sandbox.git
# Checkout the Release_4.0 branch
git checkout Release_4.0
# Make changes to the models
emacs modelica/MyPackage\ 4.0/package.mo &
# Commit changes
git commit -m "Added bugfix" modelica/MyPackage\ 4.0/package.mo
# Upload changes to server
git push
# Switch to master branch
git checkout master