To Clone git clone ssh://jthornton@git.linuxcnc.org/git/emc2.git emc cd emc-dev git checkout branch_name To Merge 2.6 to 2.7 git checkout 2.7 git merge 2.6 git push git merge 2.7 Auto-merging debian/changelog CONFLICT (content): Merge conflict in debian/changelog Auto-merging VERSION CONFLICT (content): Merge conflict in VERSION Automatic merge failed; fix conflicts and then commit the result. you'll have to combine the changelog manually so it has the 2.7.3 items but then the correct version for master at the top; for VERSION just pick the master side checkout 2.7 go to debian/changelog and copy the latest changes then checkout master and paste them into the change log To Build cd emc/src ./autogen.sh ./configure --enable-build-documentation >> /home/john/Desktop/configure.txt 2>&1 make clean > /home/john/Desktop/make_clean.txt 2>&1 make > /home/john/Desktop/make.txt 2>&1 git checkout v2.4_branch git cherry-pick [the commit ref but not with the r] to show a commit git show aacfa647c0 to search git gitk --grep=g98 to view all branches git branch -r to view the referenc log git reflog git reset --hard origin/v2.5_branch to search a directory in git git grep ORIENT_OFFSET -- src find . -name "*.txt" -exec grep -ilH "some_string" {} \ Which translates in english to.. search (find) in this folder (.) for files matching the filter ( -name ) *.php [ recursiveness should be default ]; when each file is found, execute grep, look for 'some_string', and pass in the found filename ( where the {} placeholder is ). Because that effectively executes grep once per file ( rather than once for many files ), you need the -H option to force grep to turn on the output of the filename; it wouldn't bother otherwise for a single file grep. Messy eh? No wonder they put this functionality directly into grep for the next version... Find everything between [[ and ]] find . ! -name '*.hu.txt' ! -name '*fr.txt' ! -name '*es.txt' -iname '*.txt' -exec grep -H "\[\[.*\]\]" {} \; > /home/john/anchors.txt Tree tree -P '*.txt' > emc-tree.txt to send the output of make and stderr to a file make clean >> /home/john/Desktop/make_clean.txt 2>&1 ./configure >> /home/john/Desktop/configure.txt 2>&1 make >> /home/john/Desktop/make.txt 2>&1 git blame docs/src/gui/gladevcp.txt grep -lir "<<*Halmeter" * cd src ./autogen.sh ./configure ./configure --enable-build-documentation ./configure --enable-build-documentation=html ./configure --enable-build-documentation=pdf make sudo make setuid resolving a conflict jthornton: I use "git config --global merge.conflictstyle diff3" which I think makes it much easier to understand conflicts then it shows all three things: the common ancestor, what one side changed it to, what the other side changed it to without the common ancestor showing, it's very hard to tell how to fix some merges a while ago i convinced git to use meld in diff3 mode, works great if you're into that whole "gooey" thing the kids do nowdays meld doesn't make it easier for me to understand... meld usually looks almost identical to diff3, but it adds sub-line highlighting of differences and similarities sometimes it gets it wrong, of course, but sometimes that's really handy hm, I should try merge.conflictstyle though merge.tool=vimdiff lets me have an editor that makes me happy, and which shows the file-with-conflicts and both ancestors in 3 panes does it show common ancestor? cradek: having tried conflictstyle=diff3 I now understand what you mean -- and no, vimdiff doesn't have a way of showing this information seems like all the three-pane gui tools don't show the ancestor, and I think it's impossible to merge without seeing it they all show the file-as-it-is in the center column, so setting that in the config adds it to any of the graphical tools when I quit trying to use a gui (and discovered diff3) I got much more confident that I was actually getting merges right ============================== after you git pull, and you see that debian/control.in was changed, you cd debian and run configure there (either "configure sim" or "configure -a" for realtime) that rebuilds the debian/control file then you cd back to the top-level (the dir with debian/ and src/ and docs/) and run dpkg-checkbuilddeps it'll list all the packages the debian/control file thinks are build dependencies, that are not installed then you apt-get install those and all is well Branches ======================= when you're done with a branch, delete it from linuxcnc.org by pushing "the empty branch" to that name, like this: git push origin :branch-to-delete the nothing before the : is the local branch name, in this case nothing, so the branch named "branch-to-delete" on the server "origin" will be removed test it with "push --dry-run" first to make sure it'll do what you want Add a new Remote ================ specificity git.mah.priv.at/gitweb/emc2-dev.git/shortlog/refs/heads/g84-dev [07:30] jthornton: at the front page of the gitweb you're told the URL [07:30] http://git.mah.priv.at/gitweb/emc2-dev.git/ says git://git.mah.priv.at/emc2-dev.git [07:30] so first create a new remote with that url: $ git remote add mah git://git.mah.priv.at/emc2-dev.git [07:31] now you can fetch from it: $ git fetch mah [07:31] ok, thanks [07:31] now there are branches like mah/g84-dev that you can refer to with 'git checkout', 'git merge', and so on