[fpc-other] [fpc-pascal] Google Code closing down

Graeme Geldenhuys graeme at geldenhuys.co.uk
Mon Mar 16 15:18:25 CET 2015


Hello Martin,

On 2015-03-16 13:17, Martin Frb wrote:
> Local commits (commit, without push) can be a huge advantage.

Ah yes, but they loved the idea shortly afterwards. Then weeks later
when I mentioned the rebase command to neaten up local commits before
you make it public - that was another hour of explanation and examples
on a whiteboard. :-)  Strangely they found out by themselves (to my
surprise) about the 'rebase --onto' command and now use that a lot.


>   "svn up" is roughly equal to: stash, fetch and rebase (pull?), stash pop.

A simple git alias can do that for you all in one command. ;-) I've
attached some of my most used alias commands. You might find some of
them useful. Simply copy them into your $HOME/.gitconfig file.

pull = fetch + rebase

The newer git is pretty clever and the command tips seen in the CLI
output is often very useful. I believe it can do a stash and pop
automatically for you. I also know the 'git svn fetch' automatically
does a rebase of your local commits not yet in SubVersion.


> This is, if I want to update, and just be left with any merge conflicts 
> in by local changes.

And that is why I trained them from the start to develop in local
feature branches, and never directly in 'master' or 'develop' (any
tracking branches). Follow that and you will never get a conflict on a
'git pull' again. In fact you don't need 'git pull' then, only 'git
fetch' will suffice. Then when you have the time, you can review the
latest changes from upstream (origin) and merge those into your local
feature branch - when it suits you.

Regards,
  Graeme
-------------- next part --------------

[alias]
    # to list these alias via 'git alias'
    alias = config --get-regexp ^alias\\.
    one = show -s --pretty='format:%h (%s)'
    l = log --pretty='format:%h %ad %s' --date=short
    lg = log --graph --decorate --pretty=oneline --abbrev-commit
    lga = log --graph --decorate --pretty=oneline --abbrev-commit --all
    ilog = log --date=iso
    llog = log --date=local
    subj = show -s --pretty='format:Changes in %h (%s)'
    who = !sh -c 'git log -1 --pretty=\"format:%an <%ae>\" --author=\"$1\"' -
    whatis = "!f() { git show -s --pretty='format:%h (%s, %ai' \"$@\" | sed -e 's/ [012][0-9]:[0-5][0-9]:[0-5][0-9] [-+][0-9][0-9][0-9][0-9]$/)\\n/'; }; f"
#    svnrev = log --pretty=format:%b -n 1 HEAD~1 | egrep '^git-svn-id:' | sed 's:.*/\([^/]*\)@\([0-9]*\) [0-9a-f].*:r\2:'
    svnlog = log --stat=70 --pretty=medium --name-status
    # param1 is to address. param2 is patch file created with 'format-patch -1 sha1'
    email = !sh -c 'git send-email --to=$1 --smtp-server=192.168.0.17 --suppress-cc=all --annotate $2' -
    svnrevlog = !sh -c 'git log --grep=@$1 --pretty='format:%H' upstream' -
    svnrevlog1 = !sh -c 'git log --grep=@$1 --pretty='format:%H' master' -
    svnrevlog2 = !sh -c 'git rev-list --grep=\"@$1\" upstream' -
    svncpick = 'git cherry-pick | git svnlog $1'
    st = status -uno
    apply-patch = 'git apply --ignore-whitespace $1'
    # list branches sorted by last modified
    changelog = 'git log master..develop | git shortlog'
    st = status -uno
    a = add
    ap = add -p
    c = commit --verbose
    ca = commit -a --verbose
    cm = commit -m
    cam = commit -a -m
    m = commit --amend --verbose
    u = reset --hard
    d = diff
    ds = diff --stat
    dc = diff --cached
    s = status -s
    co = checkout
    cob = checkout -b
    # list branches sorted by last modified
    b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
	# Create deployment package using 7zip instead, but still a ZIP archive
	deploy = !sh -c 'git diff --name-only --diff-filter=ACMRT -z $1 | xargs -0 7z.exe a -tzip deploy_$0.zip'



More information about the fpc-other mailing list