git workflow: Can I prevent a certain file from being merged to another branch but still keep it under version control?

I found an answer on another question on Stack Overflow, credit goes to fcurella: Let’s say you want to exclude the file config.php On branch A: Create a file named .gitattributes in the same dir, with this line: config.php merge=ours. This tells git what strategy to use when merging the file. In this case it … Read more

How can I prevent foxtrot merges in my ‘master’ branch?

The following pre-receive hook will block those: #/bin/bash # Copyright (c) 2016 G. Sylvie Davies. http://bit-booster.com/ # Copyright (c) 2016 torek. http://stackoverflow.com/users/1256452/torek # License: MIT license. https://opensource.org/licenses/MIT while read oldrev newrev refname do if [ “$refname” = “refs/heads/master” ]; then MATCH=`git log –first-parent –pretty=’%H %P’ $oldrev..$newrev | grep $oldrev | awk ‘{ print \$2 }’` … Read more

Git conflict (rename/rename)

Given the following test-setup: git init resolving-rename-conflicts cd resolving-rename-conflicts echo “this file we will rename” > will-be-renamed.txt git add -A git commit -m “initial commit” git checkout -b branch1 git rename will-be-renamed.txt new-name-1.txt git commit -a -m “renamed a file on branch1” git checkout -b branch2 master git rename will-be-renamed.txt new-name-2.txt git commit -a -m … Read more

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