Go to github and create a repository. Follow the instructions for cloning your repository to your local machine. (Shown below and on github.com everytime you create a new repo.)
For the case of Flashcards 1.0, follow these instructions:
mkdir <your_flashcard_dir>
cd <your_flashcard_dir>
git clone https://gist.github.com/b5e5f90484436f1e7b95.git gist_files # flashcards gist
mv gist_files/* .
git init
git add . # adds all the files in your directory to the stage
git commit -m "Added Flashcards File" # commits your stage to your local repo
git remote add origin https://github.com/<creator-name>/<project-name>.git
git push -u origin master
Use one team member's repo as the single master repo. (Do not each clone your own repos, this will make things much more difficult!)
For every team member, follow these instructions for adding a collaborator. Also add the collaborator "dbc-apprentice" since that's the user that all the machines are logged in as.
On each machine:
cd ~/Desktop
git clone [email protected]:<creator-name>/<project-name>.git
###Adding and Committing
git add .
git commit -m"Added flashcards.txt file"
###Pulling and Pushing
git pull origin master
git push origin master
###Git Status and Log
git status
git log
###The Git Cycle You Need to Know
- Add and commit
- Pull the master from github
(git will automagically merge changes unless there is a direct conflict) - Push your integrated local copy back to master