How do you get git to always pull from a specific branch?

Under [branch “master”], try adding the following to the repo’s Git config file (.git/config): [branch “master”] remote = origin merge = refs/heads/master This tells Git 2 things: When you’re on the master branch, the default remote is origin. When using git pull on the master branch, with no remote and branch specified, use the default … Read more

Managing large binary files with Git

I discovered git-annex recently which I find awesome. It was designed for managing large files efficiently. I use it for my photo/music (etc.) collections. The development of git-annex is very active. The content of the files can be removed from the Git repository, only the tree hierarchy is tracked by Git (through symlinks). However, to … Read more

Git mergetool generates unwanted .orig files

A possible solution from git config: git config –global mergetool.keepBackup false After performing a merge, the original file with conflict markers can be saved as a file with a .orig extension. If this variable is set to false then this file is not preserved. Defaults to true (i.e. keep the backup files). The alternative being … Read more

Delete all local git branches

The ‘git branch -d’ subcommand can delete more than one branch. So, simplifying @sblom’s answer but adding a critical xargs: git branch -D `git branch –merged | grep -v \* | xargs` or, further simplified to: git branch –merged | grep -v \* | xargs git branch -D Importantly, as noted by @AndrewC, using git … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)