create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| http://encosia.com/dont-let-jquerys-document-ready-slow-you-down |
| # Fork a repository (owned by someone else usually. In this case, fordprefect forked from rgsingh) | |
| git clone https://github.com/fordprefect/feature-dev-demo.git | |
| # Establish an upstream so that your fork can keep in sync with the original repo. | |
| cd feature-dev-demo | |
| git remote add upstream https://github.com/th-js-meetup/feature-dev-demo.git | |
| # Pull down all of the deltas from the original repo via upstream | |
| git fetch upstream |
| # Typically, a discussion between a repo owner and collaborator will result in a pull request being assigned back to | |
| # the respective collaborator, a new commit created, and being assigned back to the repo owner for review. This interaction | |
| # can result in many commits per pull request. | |
| # If following the convention of a commit header message which prefixes with an issue number, squashing commits for the same | |
| # issue is very easy. | |
| # For example, if "git log" shows 3 commits with commit messages starting with "Issue #3" or "i3", it is easy to visually | |
| # determine what "n" should be. | |
| #git rebase -i HEAD-<n> | |
| git rebase -i HEAD-3 |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
####Replace USER with username and REPO with the name of the repository/application.
git init
curl -u 'USER' https://api.github.com/user/repos -d '{"name":"REPO"}'
git add whatever
git commit -a
| import java.util.Collection; | |
| import java.util.List; | |
| import java.util.ListIterator; | |
| import org.springframework.data.domain.PageImpl; | |
| import org.springframework.data.domain.Pageable; | |
| /** | |
| * Extension class between spring data commons and java.util.List that is | |
| * required to get MyBatis to use it as a return value. |
| #Open two files that need to be diffed | |
| :e file1 | |
| Ctrl-w n | |
| :e file2 | |
| :windo diffthis | |
| :windo diffoff | |
| Ctrl w t Ctrl w H (horizontal) | |
| Ctrl w t Ctrl w K (vertical) |
| :syntax on | |
| :set syntax=whitespace | |
| ... then search for a string | |
| ...tab characters will be highlighted in blue | |
| ...space characters will be highlighted in red | |
| If comparing more than one file in split windows, switch to that file (Ctrl-W w) | |
| and set the syntax equal to whitespace to enable the color coding effect (:set syntax=whitespace). |
| // If a push to the remote origin was already done then do the following | |
| 1. git stash // in same directory as previous commit | |
| 2. git reset --hard HEAD~1 // reset to the commit before last | |
| 3. git stash apply | |
| 4. Build if necessary and test | |
| 5. Commit whatever is needed | |
| 6. git push origin HEAD --force | |
| 7. Done | |
| 8. Have cake |
| The MIT License (MIT) | |
| Copyright (c) 2015 Justin Perry | |
| Permission is hereby granted, free of charge, to any person obtaining a copy of | |
| this software and associated documentation files (the "Software"), to deal in | |
| the Software without restriction, including without limitation the rights to | |
| use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
| the Software, and to permit persons to whom the Software is furnished to do so, | |
| subject to the following conditions: |