Donnerstag, 30. August 2018

GIT Troubleshooting - revert and pull not possible?

Sometimes a file does not differ from the repository version. But GIT shows it as modified and does not accept a revert.

This file, however should not be commited, because it has not changed, but is simply not properly managed by GIT.

This is related to GIT working in file mode.

Try this and then pull again:

$git config core.fileMode false

Dienstag, 21. August 2018

Squash GIT commits

//checkout from a remote branch to a local branch A
$ git branch
...
branch A (highlited)
...
$ git checkout -b B
...
branch B (highlited)
...
  
//do multiple commits to preserve the steps and protect everything with version control
$ git commit -am "[BPA-...] ..."
$ git commit -am "[BPA-...] interim, not compiling"
$ git commit -am "[BPA-...] reverting the change and doing something other"
... 
//done? then checkout to local branch A again and merge, squash the commits
  
$ git checkout A
$ git merge --squash B
// all commits are gathered into one.
  
//finally, push to the remote. One commit, nice and clean
$ git push origin/A A

How To Resolve GIT Merge Conflicts with IntelliJ

Resolve a Merge Conflict in GIT with IntelliJ Let us assume you are using Bitbucket or a similar tool to administrate and host your GI...