GitHub
LCOGT/lcogtsnpipe
Supernova
<user>/lcogtsnpipe
Supernova
/supernova/git/lcogtsnpipe
Your Workstation
<user>/lcogtsnpipe
GitHub
LCOGT/lcogtsnpipe
Your Workstation
<user>/lcogtsnpipe
Developing a New Feature
git clone git@github.com:LCOGT/lcogtsnpipe.git
"origin"
clone
GitHub
LCOGT/lcogtsnpipe
Your Workstation
<user>/lcogtsnpipe
Access your local copy
git clone git@github.com:LCOGT/lcogtsnpipe.git
git branch
git remote -v
* More recent repositories have changed the default branch from master to main
"origin"
master
master
GitHub
LCOGT/lcogtsnpipe
Your Workstation
<user>/lcogtsnpipe
Make a Clean Start
git clone git@github.com:LCOGT/lcogtsnpipe.git
git branch
git remote -v
git pull origin master
fetch the master branch from origin
merge the master branch from origin into your current branch (which we checked was master)
* More recent repositories have changed the default branch from master to main
"origin"
master
master
origin/master
fetch
merge
GitHub
LCOGT/lcogtsnpipe
Your Workstation
<user>/lcogtsnpipe
Branching
git branch new_feature
git branch
git checkout new_feature
git branch
master
new_features
c1m
c2m
c3m
c3m=c1nf
merge
GitHub
LCOGT/lcogtsnpipe
Your Workstation
<user>/lcogtsnpipe
Developing Your New Feature
git branch
git add <modified_filename>
git commit -m "commit message"
master
new_features
c1m
c2m
c3m
c3m=c1nf
c2nf
c3nf
add commmit
GitHub
LCOGT/lcogtsnpipe
Your Workstation
<user>/lcogtsnpipe
Updating Your Branch
git checkout master
git pull origin master
git checkout new_feature
git merge master
master
new_features
c1m
c2m
c3m
c3m=c1nf
c2nf
c3nf
c4m=c8gh+c3m
c8gh
git pull
c4nf=c4m+c3nf
merge
master
GitHub
LCOGT/lcogtsnpipe
Your Workstation
<user>/lcogtsnpipe
Testing your code
master
new_features
c1m
c2m
c3m
c3m=c1nf
c2nf
c3nf
c4m=c8gh+c3m
c8gh
git pull
c4nf=c4m+c3nf
merge
master
GitHub
LCOGT/lcogtsnpipe
Your Workstation
<user>/lcogtsnpipe
Push your code to GitHub
git push -u origin new_feature
master
new_features
c1m
c2m
c3m
c3m=c1nf
c2nf
c3nf
c4m=c8gh+c3m
c8gh
git pull
c4nf=c4m+c3nf
merge
master
GitHub
LCOGT/lcogtsnpipe
Creating a Pull Request
On GitHub:
c8gh
master
new_feature
c4nf
GitHub
LCOGT/
lcosnpipe
Megan
LCOGT/
lcosnpipe
Supernova
user/
lcosnpipe
make branch
change code
push to GitHub (create remote branch)
1.
fetch remote branch
checkout remote branch
install
test
Open PR
merge PR
2.
3.
4.
GitHub
LCOGT/
lcosnpipe
Megan
drmegan/
lcosnpipe
Supernova
LCOGT/
lcosnpipe
make branch
change code
push to GitHub (create remote branch)
1.
fetch remote branch
checkout remote branch
install
test
Open PR
merge PR
2.
3.
4.
GitHub
drmegan/
lcosnpipe
* this has the advantage of not having to add a remote
GitHub
LCOGT/
lcosnpipe
Megan
drmegan/
lcosnpipe
Supernova
LCOGT/
lcosnpipe
make branch
change code
push to GitHub (create remote branch)
1.
fetch remote branch
checkout remote branch
install
test
Open PR
merge PR
2.
3.
4.
GitHub
drmegan/
lcosnpipe
* this has the advantage of being able to incorporate changes
GitHub
LCOGT/
lcosnpipe
Megan
drmegan/
lcosnpipe
Supernova
LCOGT/
lcosnpipe
make branch
change code
push to GitHub (create remote branch)
1.
fetch remote branch
checkout remote branch
install
test
Open PR
merge PR
2.
3.
4.
GitHub
drmegan/
lcosnpipe