Skip to content
Snippets Groups Projects
Commit 7d057d4c authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

make it more explicit, that master needs to be updated and feature branches...

make it more explicit, that master needs to be updated and feature branches should be created from master
parent 4f096dba
No related branches found
No related tags found
No related merge requests found
...@@ -85,18 +85,20 @@ test them without interfering with the repository on Github. ...@@ -85,18 +85,20 @@ test them without interfering with the repository on Github.
To pull changes from upstream into this copy, you can go to the directory To pull changes from upstream into this copy, you can go to the directory
and use git pull: and use git pull:
$ cd mylammps :pre $ cd mylammps
$ git checkout master
$ git pull https://github.com/lammps/lammps :pre $ git pull https://github.com/lammps/lammps :pre
You can also add this url as a remote: You can also add this url as a remote:
$ git remote add lammps_upstream https://www.github.com/lammps/lammps :pre $ git remote add lammps_upstream https://www.github.com/lammps/lammps :pre
At this point, you typically make a feature branch for the feature you At this point, you typically make a feature branch from the updated master
want to work on. This tutorial contains the workflow that updated this branch for the feature you want to work on. This tutorial contains the
tutorial, and hence we will call the branch "github-tutorial-update": workflow that updated this tutorial, and hence we will call the branch
"github-tutorial-update":
$ git checkout -b github-tutorial-update :pre $ git checkout -b github-tutorial-update master :pre
Now that we have changed branches, we can make our changes to our local Now that we have changed branches, we can make our changes to our local
repository. Just remember that if you want to start working on another, repository. Just remember that if you want to start working on another,
...@@ -111,15 +113,14 @@ After everything is done, add the files to the branch and commit them: ...@@ -111,15 +113,14 @@ After everything is done, add the files to the branch and commit them:
[Warning] [Warning]
{"Do not use "git commit -a". the -a flag will automatically include {Do not use `git commit -a`. The -a flag will automatically include
*all* modified or new files. mercurial does that and it find it _all_ modified or new files and that is rarely the behavior you want.
hugely annoying and often leading to accidental commits of files you It can easily create to accidentally adding unrelated and unwanted
don't want. use git add, git rm, git mv for adding, removing, changes into the repository. It is highly preferable to explicitly
renaming and then git commit to finalize the commit. personally, i use `git add`, `git rm`, `git mv` for adding, removing, renaming files,
find it very convenient to use the bundled gui for commits, i.e. git respectively, and then `git commit` to finalize the commit. If you
gui. typically, i will do git add and other operations, but then find doing this on the command line too tedious, consider using a GUI,
verify and review them with git gui. git gui also allows to do the one included in git distributions written in Tk, i.e. use `git gui`.}
line-by-line unstaging and other convenient operations." - Axel}
After adding all files, the change can be commited with some useful message After adding all files, the change can be commited with some useful message
that explains the change. that explains the change.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment