Source: http://producingoss.com/
Source: http://reprap.org/wiki/Mendel
Source: http://www.thingiverse.com/
Source: http://subversion.apache.org/
Source: Pilato, C. M., Collins-Sussman, B., & Fitzpatrick, B. W. (2008). Version control with Subversion. Sebastopol, CA: O’Reilly Media. Retrieved from http://svnbook.red-bean.com/
Source: Pilato, C. M., Collins-Sussman, B., & Fitzpatrick, B. W. (2008). Version control with Subversion. Sebastopol, CA: O’Reilly Media. Retrieved from http://svnbook.red-bean.com/
Source: Pilato, C. M., Collins-Sussman, B., & Fitzpatrick, B. W. (2008). Version control with Subversion. Sebastopol, CA: O’Reilly Media. Retrieved from http://svnbook.red-bean.com/
Source: Pilato, C. M., Collins-Sussman, B., & Fitzpatrick, B. W. (2008). Version control with Subversion. Sebastopol, CA: O’Reilly Media. Retrieved from http://svnbook.red-bean.com/
Source: Pilato, C. M., Collins-Sussman, B., & Fitzpatrick, B. W. (2008). Version control with Subversion. Sebastopol, CA: O’Reilly Media. Retrieved from http://svnbook.red-bean.com/
Source: http://git-scm.com/
Source: http://youtu.be/hKfo0OXc1BI
Source: Chacon, S. (2009). Pro Git. Berkeley, CA; New York: Apress ; Distributed to the Book trade worldwide by Springer-Verlag. Retrieved from http://git-scm.com/book
Source: Loeliger, J., & McCullough, M. (2012). Version Control with Git: Powerful tools and techniques for collaborative software development (2 edition.). O’Reilly Media.
Source: http://gitimmersion.com/
Source: Chacon, S. (2009). Pro Git. Berkeley, CA; New York: Apress ; Distributed to the Book trade worldwide by Springer-Verlag. Retrieved from http://git-scm.com/book
Source: Chacon, S. (2009). Pro Git. Berkeley, CA; New York: Apress ; Distributed to the Book trade worldwide by Springer-Verlag. Retrieved from http://git-scm.com/book
Source: Chacon, S. (2009). Pro Git. Berkeley, CA; New York: Apress ; Distributed to the Book trade worldwide by Springer-Verlag. Retrieved from http://git-scm.com/book
Source: Chacon, S. (2009). Pro Git. Berkeley, CA; New York: Apress ; Distributed to the Book trade worldwide by Springer-Verlag. Retrieved from http://git-scm.com/book
Source: https://help.github.com/articles/set-up-git#platform-windows
pwd #Print current directory
cd <directory name> #Enter into a directory
cd .. #Exit from the directory by going to the parent directory
ls #List the files of the current directory
ls -l #List the files of the current directory, with details
ls -la #List the files with hidden files and folders
mkdir <directory name> #Make a directory
rm -r <directory name> #Erase a directory and its contents
touch <file name> #Make an empty file
vim <file name> #Edit an empty file.
"I" for editing and then "Esc", ":w" for saving, ":q" for quitting
rm <file name> #Erase a file
mv <file name> <where to move it> #Move or rename a file
cp <file name> <where to copy it> #Copy a file
git config --global user.name "Name Surname" #Configure your name
git config --global user.email "email@email.com" #Configure your e-mail
git config --global color.ui auto #Color the output
Source: http://www.perforce.com/product/components/perforce-visual-merge-and-diff-tools
Source: http://www.perforce.com/downloads/Perforce/20-User#10
git config --global merge.tool p4mergetool
git config --global mergetool.p4mergetool.cmd \
"/Applications/p4merge.app/Contents/Resources/launchp4merge \$PWD/\$BASE \$PWD/\$REMOTE \$PWD/\$LOCAL \$PWD/\$MERGED"
git config --global mergetool.p4mergetool.trustExitCode false
git config --global mergetool.keepBackup false
git config --global diff.tool p4mergetool
git config --global difftool.p4mergetool.cmd \
"/Applications/p4merge.app/Contents/Resources/launchp4merge \$LOCAL \$REMOTE"
git config --global merge.tool p4mergetool
git config --global mergetool.p4merge.cmd 'p4merge.exe \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"'
git config --global mergetool.p4mergetool.trustExitCode false
git config --global mergetool.keepBackup false
git config --global diff.tool p4mergetool
git config --global difftool.p4merge.cmd 'p4merge.exe \"$LOCAL\" \"$REMOTE\"'
Source: Chacon, S. (2009). Pro Git. Berkeley, CA; New York: Apress ; Distributed to the Book trade worldwide by Springer-Verlag. Retrieved from http://git-scm.com/book
cd <directory name> #Enter into the project directory
git init #Start local repository
git status #Get status of the working directory/stage
git add <file name> #Add a file to the stage
git add . #Add all files from current directory to the stage
git add -u #Update (add) all files already being tracked
git commit -m "messagetext" #Commit changes with a message
Source: Chacon, S. (2009). Pro Git. Berkeley, CA; New York: Apress ; Distributed to the Book trade worldwide by Springer-Verlag. Retrieved from http://git-scm.com/book
Create a local repository, and add + commit your bio file written in Markdown (more info here and here).
git rm <file name> #Erase a file within Git
git rm -f <file name> #Erase a file from the index from Git
git mv <file name> <wheretomove> #Move a file within Git
git log #Commit history in the command line
gitk #Commit history in a separate window
git diff-tree --no-commit-id --name-only -r <commithash> #Changed files of a commit
git ls-tree --name-only <commithash> #All files of a commit
Rename your bio file name.surname.md.
01: git commit -m "initial commit"
02: git add <forgotten file>
git commit --amend #Replace last commit with added/removed files
git reset HEAD <file name> #Unstage a staged file
git checkout -- <file name> #Overwrite a file with last commit version
More information: http://git-scm.com/book/en/Git-Basics-Undoing-Things
git clone <link to repository> #Clone a remote repo locally
git add remote <name> <link to repo> #Add a remote repository with a name
git remote -v #View current remotes
git remote rm <name of the remote> #Remove a remote repo
git push <name of the remote> #Push local changes to remote
git pull <name of the remote> #Get+merge new version from remote
...
Create a repository on GitHub, and add its remote to your local repository, and push your bio.
Source: Chacon, S. (2009). Pro Git. Berkeley, CA; New York: Apress ; Distributed to the Book trade worldwide by Springer-Verlag. Retrieved from http://git-scm.com/book
Source: Chacon, S. (2009). Pro Git. Berkeley, CA; New York: Apress ; Distributed to the Book trade worldwide by Springer-Verlag. Retrieved from http://git-scm.com/book
Source: Chacon, S. (2009). Pro Git. Berkeley, CA; New York: Apress ; Distributed to the Book trade worldwide by Springer-Verlag. Retrieved from http://git-scm.com/book
git branch <name of the branch> #Create a local branch
git push <name of the remote> <name of the branch> #Push branch to remote
git checkout <name of the branch> #Switch to another branch
git checkout master #Go back to master branch
git diff <name of the branch> master #Diff branches before merging
git merge <name of the branch> #Merge the branch with current branch
git branch -d <name of the branch> #Delete a local branch
git push origin :<name of the branch> #Delete a remote branch
git diff #Diff w/ Index / Working Directory
git diff HEAD #Diff w/ HEAD / Working Directory
git diff <sha1> <sha2> #Diff w/ two commits
git difftool <...> #Better diff and for images
Create a branch where you will add your hobby to the bio, push it to GitHub.
Diff(tool) it with the master, merge and push to GitHub.
git tag #List existing tags
git tag -a <tagname> -m 'messagetext' #Create a version tag, tagname = v1.0
git push origin <tagname> # Push a tag to the remote repository
Create v0.1 and push it to GitHub
git fetch <name of the remote> #Fetch a remote repo
And then compare it (it is a local "remote" branch for example origin/master) (see http://stackoverflow.com/a/1331459
git diff --stat <name of the branch> <name of the fetched branch>
For example:
git diff --stat master origin/master
Do your diff/modifications and then merge (while in your master or where you want to merge)
git merge <name of the fetched branch>
For example:
git merge origin/master
git checkout <name of the branch> #Switch to another branch
git checkout master #Go back to master branch
git reset --hard <sha> #Replace working dir with a specific commit
git checkout <sha> <filename> #Get a file from a specific commit
git checkout <sha> #Go back in time at a specific commit
But then follow the next slide...
git checkout <sha> #Go back in time at a specific commit
You will get a Detached Head, so... you can go back to master and nothing happens (if you just wanted to check things in history)
git checkout master #Go back to master and fix the detached head
...or you do your work/modifications in this way:
git branch <name of the branch> #But then create e new branch from this point in time
git checkout <name of the branch> #Go to the new branch!
... #Do your modifications
git checkout master #Go to master
git merge <name of the branch> #Update master with the branch you created
git branch -d <name of the branch> #Delete that branch if not needed
Source: http://stackoverflow.com/questions/5772192/git-how-can-i-reconcile-detached-head-with-master-origin
Get from history your first version of the bio, and push it to GitHub.
Whenever merge fails...you need to merge manually
CONFLICT (content): Merge conflict in index.html
Automatic merge failed; fix conflicts and then commit the result.
For text files: manually or
git mergetool
For binary/other files: manually or
git checkout --theirs <filename> #Keep their/remote file
git checkout --ours <filename> #Keep my/local file
And then add + commit!
git add <filename> #Add the solved/merged file(s)
git commit -m "..."
Source: http://gitready.com/advanced/2009/02/25/keep-either-file-in-merge-conflicts.html
Massimo Menichinelli / info@openp2pdesign.org / @openp2pdesign
This work is licensed under a Creative Commons Attribution 3.0 Unported License.
Massimo Menichinelli 2014-2015
openp2pdesign.org