Posts Tagged ‘git’
Friday, November 9th, 2012 by Jesper Rønn-Jensen
I wanted to do some code stats for a repository. This line checks out old revisions by date and shows code stats: git checkout `git rev-list -n 1 –before=”2012-03-01″ master` Then, I ran cloc to count lines of code: cloc . Its really easy to register the point in time as a git branch so […]
Tags: git
Posted in Code | Comments Off on Git checkout old revisions by date
Thursday, June 28th, 2012 by Jesper Rønn-Jensen
In a current project I use a lot of Subversion (svn) from the command-line. Subversion recently has lost terrain to Git for several reasons. But actually, svn is capable of doing many of the things I love from Git. Here are some less known commands I find extremely helpful. Undo last commit svn merge […]
Tags: Code, git, subversion, svn
Posted in Code, Web Development | Comments Off on Forgotten Subversion Commands, Undo, Merge Branches and More
Friday, September 30th, 2011 by Jesper Rønn-Jensen
I thought it was time to collect some of my most useful findings when working with Git. These are typically from situations where I found a useful way, which I wanted to jot down. Also I have answered and asked some questions on StackOverflow. The good thing about it, is that I am always able […]
Tags: git
Posted in Code, git | 4 Comments »
Monday, December 7th, 2009 by Jesper Rønn-Jensen
For a project I’m working on, I had to change some files with personal settings, and the files kept showing up with a git status. Adding files to .gitignore that are already tracked does not work. (and it’s actually pretty well documented in the documentation). In stead, it’s possible to use this command: git update-index […]
Tags: Code, git, ignore
Posted in Code, git, Web Development | 5 Comments »
Wednesday, September 30th, 2009 by Jesper Rønn-Jensen
Here is a short one-liner that really annoyed my colleagues today. I set my mac to read aloud all changes in the repository since yesterday: git log –pretty=format:”%an commit %s, %ad.” –date=relative –since=yesterday |say if you remove the “say” command in the end it’s actually pretty readable: pagerbak commit VA17, 34 minutes ago. pagerbak commit […]
Tags: Code, git, Humor, logging
Posted in Code, git, Humor, Web Development | 1 Comment »
Sunday, August 23rd, 2009 by Jesper Rønn-Jensen
UPDATE 9 hours later: Changed to “remote = origin” to the specific branch “remote = dean” which works! Short explanation on how to pull changes from different Git repositories into your local Git repository. Last week I worked with three different Github forks of a project. Now for standard, when you clone a Github repository, […]
Tags: Code, git, github
Posted in Code, git, Web Development | 1 Comment »
Wednesday, July 8th, 2009 by Jesper Rønn-Jensen
Many of my colleagues know svn but are in general not (yet) ready jump over to using Git for bigger projects. Today I had to import my existing Git repository into SVN. I had been working locally with a Git repos and wanted to keep my history before giving access to my colleagues. The guide […]
Tags: Code, git, subversion, svn, Web Development
Posted in Code | 7 Comments »
Monday, March 9th, 2009 by Jesper Rønn-Jensen
For the last months I have been using Git to work with my Subversion repositories. Besides from reducing disk usage, Git also makes my work slightly faster and independent of network access — I can make commits to repository which is sync’ed later when I get online. One challenge though: Using branches I ran into […]
Tags: git, svn, workflow
Posted in Code, git | 8 Comments »
Saturday, February 21st, 2009 by Jesper Rønn-Jensen
My problem this week: I wanted to share some work with a colleague. Unfortunately we have not yet setup our caplab environment with git server. Nor did i want to push this particular project to GitHub or Unfuddle. My alternative was a file-based setup: Each developer’s machine has it’s own Git repository. On my machine […]
Tags: Code, git, ssh, svn, Web Development
Posted in Code, justaddwater.dk, Web Development | Comments Off on Using Local File-based Git — Server Laziness
Saturday, January 17th, 2009 by Jesper Rønn-Jensen
A side benefit of switching from Subversion to Git for source control is that Git does not use shadow files and directories to find out what has changed. I created two checkouts of a svn project — one using traditional svn and one using git (which can actually clone a svn repos — see explanation […]
Tags: Code, git, gitify, svn
Posted in Code | 5 Comments »