danielhpavey.uk

A sorta, kinda, web development and design blog...

Posts tagged #git:

Selective Git Add

Thursday 19 January 2017

Selective Git Add git add -u This git command looks at the already tracked files and stages the changes to those files if they are different or have been removed... I found this command when I had a lot of modified files and a good handful of new files, but only wanted to

Tags: #web developmenat #git

Git --assume-unchanged Problem When Switching Branches

Friday 20 November 2015

Git --assume-unchanged Problem When Switching Branches I had a problem switching to a different branch when using git --assume-unchanged. I've been using this command as a lazy git ignore and found it quite useful. However, I recently tried to switch a branch when I had marked a config file --assume-unchanged and had…

Tags: #git #web development

Super Simple Git Submodule Guide

Tuesday 6 October 2015

Super Simple Git Submodule Guide Hopefully you already have some idea what a git submodule is, but if not: It often happens that while working on one project, you need to use another project from within it. Perhaps it’s a library that a third party developed or that you’re developing separately and…

Tags: #git #web development

How to Merge Two Git Repositories

Thursday 7 May 2015

How to Merge Two Git Repositories So I've switched this site from our friend Wordpress to a flat file CMS based site... There a few reasons why I decided to do this, but largely I did it for fun! I love me some git and wanted to preserve the git history of…

Tags: #git

Set up web based git workflow

Wednesday 17 April 2013

Set up web based git workflow You cannot push to a live working directory - throws errors and can cause many issues. Therefore need to set up a more complex git setup. Here are the steps NB you'll need terminal / ssh access to the web server Set up website as standard in…

Tags: #git

Git Remote Branches

Thursday 4 April 2013

Git Remote Branches Git is awesome, no question and the more I use it the more confident I am with it and generally happy with the world I am! If you want to pull a branch into your repository from a remote one (not necessarily the origin of the one you're working…

Tags: #git

Git Branch Notes

Tuesday 29 January 2013

Git Branch Notes Simple list of git branch commands for reference: List current branches: $ git branch Create a new branch: $ git branch branchname where branchname is name of your choosing To switch to your new branch: $ git checkout branchname To merge branches back, switch to the master branch then: $ git merge branchname Or to delete the

Tags: #git

Open All Files Staged in Git in Vim

Thursday 9 February 2017

Open All Files Staged in Git in Vim vim git status --porcelain | sed -E -e 's/^M|^A//g' This is working for me in iTerm on my Mac...

Tags: #vim #web dev #git