2

I'm using the command git difftool --tool=bc3, git opens the first file with beyond compare and wait for me to close it, than it opens the next file and it go over and over again.

How can I force git to close this session?

Thanks.

aviyaChe
  • 145
  • 1
  • 9

2 Answers2

0

You need to kill the git process to stop it from launching diffs.

There are several methods you can use to do this.

  1. Click X to close the shell window running git.
  2. Hit Control+C to kill the git process in the shell running git.
  3. Launch a new shell, use ps to find git's process id, then use the kill command to terminate the process.

    user@machine:~$ ps x | grep "git difftool"
    23879 pts/0    S+     0:00 git difftool
    23935 pts/8    S+     0:00 grep --color=auto git difftool
    user@machine:~$ kill -9 23879
    

See also the earlier question: How do you cancel an external git diff?

Community
  • 1
  • 1
Chris Kennedy
  • 2,639
  • 12
  • 11
0

You can use pkill to remove the git process as well as any scripts that will launch your difftool: pkill -f difftool

Note that pkill is a big gun and will end all processes with partial matches to the name that you supply. So, first make sure that your weapon is pointed in the right direction by listing the processes that will die at your command: ps ax | grep difftool

ashok3t
  • 41
  • 5