Skip to content
T.M.Perry edited this page May 5, 2017 · 3 revisions

git tricks

# First fork the repository to make your own workspace
# Click button to fork a local version to https://github.com/<mygithubusername>/LLDJstandalones/

# check out your copy of the code 
git clone https://github.com/<mygithubusername>/LLDJstandalones.git;
cd LLDJstandalones;

# add DisplacedHiggs as upstream
git remote add upstream https://github.com/DisplacedHiggs/LLDJstandalones.git

# # start working on your own branch if you want
# git checkout -b <mybranchname>

# `git status` should show:
# # On branch master
# nothing to commit, working directory clean

# the file LLDJstandalones/.git/config should look something like:
# [core]
#         repositoryformatversion = 0 
#         filemode = true
#         bare = false
#         logallrefupdates = true
# [remote "origin"]
#         url = https://github.com/<mygithubusername>/LLDJstandalones.git
#         fetch = +refs/heads/*:refs/remotes/origin/*
# [branch "master"]
#         remote = origin
#         merge = refs/heads/master
# [remote "upstream"]
#         url = https://github.com/DisplacedHiggs/LLDJstandalones.git
#         fetch = +refs/heads/*:refs/remotes/upstream/*

# Then make edits to your files
# Periodically, you should save these changes to your local copy on github ("origin") 
git add <filesthatchanged>
git commit -m "my commit message"
git push origin master # git push <remote> <branch>

# Once you have a finished product and are ready for the code to be merged into DisplacedHiggs
# you can submit a pull request using the button on https://github.com/<mygithubusername>/LLDJstandalones
# This will tell you if your changes can be automatically merged in
# If they can't, we'll have to resolve the conflicts manually.

# Once the pull request is accepted, make sure that your "origin" is synched with "upstream" 
git fetch upstream
git checkout master
git merge upstream/master
git push origin master

bash tricks

From cmslpc nodes, make a file called ~/.login and put in it just the line bash --login. This will log you in to a bash shell automatically, but scp still works.

Clone this wiki locally