- http://stackoverflow.com/questions/804115 (
rebasevsmerge). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebasevsmerge) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
resetvscheckoutvsrevert) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse) - http://stackoverflow.com/questions/292357 (
pullvsfetch) - http://stackoverflow.com/questions/39651 (
stashvsbranch) - http://stackoverflow.com/questions/8358035 (
resetvscheckoutvsrevert) - http://stackoverflow.com/questions/5798930 (
git resetvsgit rm --cached)
I have two independent repositories (A and B) and would like to merge one repo. (B) into another one (A) with keeping the whole history of both. What do to?
% cd projectA
% git remote add test ../path/to/other/repo && git fetch test
Adds a new branch called test which pulls in ALL branches from the /other/repo. git fetch test pulls code for all branches
1. Find the stash commits:
git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.
| abc 1 2 3 | |
| def 4 5 6 | |
| ga 7 9 10 | |
| hij 1 5 99 |
| #!/usr/bin/env ruby | |
| def format_commit_info timestamp, time_desc, commit_id, message, ref_name | |
| [ | |
| "#{timestamp.strftime("%y %b %d")}, #{timestamp.strftime("%l:%M%p").downcase}", | |
| "(#{time_desc})", | |
| commit_id, | |
| message, | |
| ref_name | |
| ] |
| package com.learning; | |
| /* package whatever; // don't place package name! */ | |
| import java.util.HashMap; | |
| class Entry { | |
| int value; | |
| int key; | |
| Entry left; | |
| Entry right; |
Similar to mpipe, this short module lets you string together tasks so that they are executed in parallel.
The difference is that it lets you use generators, functions which yield results instead of returning them. Each yielded item gets passed to the next stage.
You can specify that one or more copies of the workers operate on the input queue.
