-
Notifications
You must be signed in to change notification settings - Fork 132
Getting Started: How to install GIT and add to the repo
Welcome to the buzcode git repo, your one-stop-shop for all Buzsaki lab code! This document explains how to install the code package and the lab practices for editing lab code (if you so desire). If you have any questions and for all discussion pertaining to the code in this package, please join the #code-development channel at buzsakilab.slack.com/messages/code-development/
This link has a nice description of the git workflow. Check it out!
Check out the git tutorials!
If on linux:
sudo apt-get install git-all
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
If on mac:
- Get the GitHub Desktop app.
- Fork the the buzcode repository: click "Fork"
- Clone your forked repository to your local machine: "Clone or Download", then "Open in desktop".
- Select the folder on your machine where you want to keep your local copy of the repository. (NOT IN DROPBOX!)
If on windows:
- Figure it out and fill in the wiki with the instructions (will most likely be similar to mac)
-
Fork your own copy of the buzcode repository (press the fork button in the upper right on the buzcode github page). This fork is your personal copy of the buzcode repository.
-
Copy the URL of the forked repository and clone it to your local machine, either via command line or desktop app.
(Linux) Command line:
git clone URL (should be --> https://github.com/YOURGITHUBUSERNAME/buzcode)
(Mac/Windows) Desktop App:
Make sure you have the desktop app.
In your forked repository (https://github.com/YOURGITHUBUSERNAME/buzcode), click the green button "Clone or download". Then click "Open in desktop"
- I'd recommend making a dev branch on your fork (I call mine DLdev), which you can use to work on code before pull requesting it back to buzsakilab/dev. Make sure you keep your forked repository (yourname/buzcode) up to date with buzsakilab/buzcode, by following the instructions below regularly.
If on linux:
cd /yourlocalcopy/buzcode
git remote add upstream https://github.com/buzsakilab/buzcode
- Sync your fork with buzsakilab/buzcode (Every time)
cd /yourlocalcopy/buzcode
git fetch upstream
git checkout master
git push origin master
git merge upstream/master
If on mac/windows:
- If you have your own dev branch on your fork, click Branch > Merge into current branch. Merge from upstream/dev.
- In the git desktop app, click Fetch origin
- Click Pull/Push
- Celebrate!
Before making any changes, make sure you have the most recent version of buzcode (follow #3 above)!!!
If on linux:
-
Make sure you have sync'd the most recent version of buzskakilab/buzcode (follow #3 above)
-
Move to a directory you'd like to make changes in the forked repository
cd analysis/spikes/synapticTimescaleConnectivity/
-
Copy your code or make changes here (Don't use lab member names, use a folder name that describes the analysis)
-
Change directory to the home directory of your local version of buzcode
cd /yourlocalcopy/buzcode
- Add, commit, and push your changes to the online version of your forked repository
git add -A
git commit -m "synapse detection added"
git push origin master
-
Navigate to the original buzsakilab repo in a web browser (https://github.com/buzsakilab/buzcode)
-
Click "New pull request" (upper left button)
-
You should see your forked version and the buzsaki lab repositories. Click "Create pull request"
You're all set!
(Mac/Windows) Desktop App:
- In the git desktop app, first make sure you have "commit"-ed and "sync"-ed your changes
- click Update from buzsakilab/master 2.5) Fix any conflicts if they exist
- Click Pull Request
- Celebrate!