![]() ![]() You can also use the visualization tool: git difftool master origin/master: Git diff master origin/master(origin is the reference name of the remote github, this can be changed.) This is the comparison of the local and remote master branches. You can also use the HEAD~2 form, which is the same as HEAD^^. #P4merge command line mac windows#HEAD^ indicates the last commit, HEAD^^ indicates the last two commits, and so on. Configuring P4merge on Windows Just go to Git bash and type P4merge and press enter, Now the Git Bash replies that p4merge is not the known command. Git diff HEAD HEAD^(This command may be a bit problem on windows, please use git bash): The following command compares HEAD and HEAD last time: Where xxx and yyy both represent the id of the commit, The last commit can be represented by HEAD. Just want to compare a file / path, you need to add parameters:įirst look at the history: git log -oneline: If you execute git diff, then both files will be compared: Modify another file for the project and view the status: ![]() However when I do a p4 diff I would like to be able to bring up P4Merge (a GUI diff versus text based). For most of my stuff, I work in a cygwin shell using the cygwin p4 to do command line work. I also have a cygwin implementation with the command line build of p4 for cygwin. Use the visualization tool: git difftool -staged HEAD: Windows XP machine with P4Win, P4Merge, and p4.exe installed. The following uses the visual difftool: git difftool HEAD.Ĭompare the Staging area with the last commit. On the left is the stage, on the right is no stage.Ĭompare working directory with last commit: ![]() This will pop up the p4merge visual tool, which can clearly see the changes. If you want to quit, just press q.īecause I have git difftool configured, I can also use git difftoolThis command: If there are too many changes, you can't display it. Without any arguments, the command The comparison is in the working directory, the change of the stage is not changed by the stage.: In order to know more details, you need to use it here. Git status tells me that this file has been modified, but didn't tell me where it was modified. Prepare a project below, the current project status is: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |