Changelogs are handy sometimes, but I’m curious so I prefer to see code changes and learn new things so while the new WordPress security release came by I looked at it at GitHub with compare
I also checked what’s new in Arch Linux’s today’s VIM update.
To check other repo just replace thinks in the URL:
For more about GitHub compare read https://help.github.com/articles/comparing-commits-across-time/
Just came by https://git-template.readthedocs.io/en/latest/ and stumbled on trying it out.
I like the idea and concept so far.
I needed the submodules on a remote host, but without cloning the parent repo.
So I ended up with the following clone solution
||cat .gitmodules|grep url|cut -d = -f 2 | xargs -L1 git clone
As a GitHub newbie I had no clue how to sync my fork with upstream master repo. I had the following notice on my forked repo:
So after googling, the solution were some GIT commands:
1. Clone your fork:
2. Add remote from original repository in your forked repository:
git clone email@example.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
3. Updating your fork from original repo to keep up with their changes:
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git pull upstream master
More info at GitHub’s help page help.github.com/articles/syncing-a-fork/
I thought fork master will be auto-updated with upstream master.
Everyday I learn something new 🙂
I invoice some of my clients on monthly basis so the following Git alias in my .gitconfig for listing last month commits is a big timesaver for me:
|| last-month = !git log –reverse –pretty=format:'%cd %h %s' –date=short –no-merges –since=$(date -d \"$(date +%Y-%m)-01 last month\" \"+%Y-%m-01\") –author=$(git config user.email)
Thanks to Paul Irish for the git open command.
Many thanks to http://eikke.com/importing-a-git-tree-into-a-subversion-repository/
git svn init exclude /trunk at the end (I failed with this), because
.git/config in the svn section defines the fetch path and appends the /trunk
url = https://EXAMPLE.COM:PORT/svn/repo
fetch = trunk:refs/remotes/origin/trunk
branches = branches/*:refs/remotes/origin/*
tags = tags/*:refs/remotes/origin/tags/*
So in my case this worked:
$ git svn init -s https://EXAMPLE.COM:PORT/svn/repo
$ git svn fetch
$ git log --pretty=oneline master | tail -n1
88464cfdf549a82b30ee7c52e53e2b310f0d9ec4 Initial commit
$ git show-ref trunk
$ echo "88464cfdf549a82b30ee7c52e53e2b310f0d9ec4 741ab63aea786882eafd38dc74369e651f554c9c" >> .git/info/grafts
Now if you check
git log and scroll to the bottom you will see another entry under your ‘Initial commit’ (first commit), that’s from where SVN commit will merge it’s content from Git.
Author: Michal Zuber
Date: Mon Jun 23 08:41:15 2014 +0200
Author: VisualSVN Server
Date: Thu Feb 26 08:34:40 2015 +0000
git-svn-id: https://EXAMPLE.com:PORT/svn/repo/trunk@1 8ce696b1-2aa8-b049-9446-9fee1243c08b
git svn dcommit
$ git svn dcommit
Committing to ...
Will push the Git stuff into Subversion repo.
To start fresh remove
rm -rf .git/svn/ and [svn] section from
.git/config which was added by
git svn init