Use when you want to edit and/or explore software that the group maintains
...
The Github Part
This assumes a GitHub account and access to SLAC Lab.
- Find the repo on SLAC Lab
![](/download/thumbnails/283672598/Screen%20Shot%202020-06-26%20at%2012.11.46%20AM.png?version=1&modificationDate=1593155889000&api=v2)
- Click "Fork" in the upper right corner. In the window that pops up, click the link that says [Your User Name]/devPanel (Mine says that I've already forked it, but yours should ask you where you want to fork it)
![Screen Shot 2020-06-19 at 7.31.37 PM.png](/plugins/servlet/confluence/placeholder/unknown-attachment?locale=en_GB&version=2)
![Screen Shot 2020-06-19 at 7.33.42 PM.png](/plugins/servlet/confluence/placeholder/unknown-attachment?locale=en_GB&version=2)
Anchor |
---|
forklink | forklink - It should automatically redirect you to your new GitHub fork. From there, click the green "Clone or Download" button and copy the ssh path. If you see what looks like a URL, click the blue "Use SSH" link right above it
![Screen Shot 2020-06-19 at 7.35.35 PM.png](/plugins/servlet/confluence/placeholder/unknown-attachment?locale=en_GB&version=2)
The SLAC Part
Instructions for lcls-srv01 (the OPIs)
Expand |
---|
- On lcls-srv01 in a terminal (it's the default when you open a terminal on an OPI), type "set_profile [Your Username]". This should take you to your personal physics directory. Make a new devPanel subdirectory
Image Modified - In that subdirectory, run "git init"
Image Modified Still in that subdirectory, type "
|
...
...
...
utils/linkRepoToGithub/link_repo_to_github.sh -i" and follow the prompts using the image below as a guide (you will need to change the remote path url to git@github.com:<your GitHub name>/<repo name>.git). You'll get slightly different messages since I've already run this before.
Image Modified Info |
---|
| It's the file system that exists in mcclogin and rhel6-64. You can't access it from lcls-srv01 (the physics account that launches when you launch a terminal from an OPI), but you can think about it like another directory tree that you have to ssh into to see. |
- Type "git pull origin
|
...
- main" and type in your password when prompted (again, messages will be slightly different since I've done this before)
Image Modified
|
...
- Run "git branch -m master main" (this is to align our local repo's default branch name "master" to the more PC default branch name "main" used in GitHub so that we don't end up accidentally developing/pushing to different branches)
|
Instructions for Bypassing lcls-srv01
Expand |
---|
- SSH into one of the SLAC machines that have internet access (like rhel6-64)
Image Added - Navigate to wherever you want your personal copy of the repo to live (I like to organize my stuff, so I have a "gitRepos" folder where all my projects live, but it's up to you!)
Image Added - Run "git clone [the link from step 3]". Now your copy lives in AFS space and should be accessible from other machines that have access to AFS, like mcclogin
Image Added
|
Related articles
Content by Label |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | MCC |
---|
showSpace | false |
---|
sort | modified |
---|
reverse | true |
---|
type | page |
---|
cql | label = "kb-how-to-article" and type = "page" and space = "MCC" |
---|
labels | kb-how-to-article |
---|
|