Git diff applies to files managed by git. The diff command has no restrictions. However, most system files are in version control, so git diff is usually used.
Recommended diff-u
I. Par
Linux text comparison command: diff
The diff command is an important tool in Linux. It is used to compare the content of files, especially files of different versions, to find the changes. Diff prints the changes of each line in the command line. The latest diff version also supports binary files. The output of the
The diff command is a very important tool on Linux to compare the contents of a file, especially to compare two different versions of a file to find where it was changed. Diff prints changes to each row on the command line. The latest version of diff also supports binary files. The diff program's output is called a pat
description page and is formatted, then the user click on the label, then reload the page, let the user see the original pagevar data = $ ("Pre"). Text (); if (data = = = undefined) return = Data.replace (/\r\n/g, "\ n" = removefooter (data);Get Patch Contentif(Data.indexof ("\n+diff--git") = = = 1 data.indexof ("\[email protected]@-") = = = 1) {prettypatch (data); } Else { $("Body"). empty
View recent n changes: git Log–n (N is an integer) git diff: View the most recent changes to a file where you see the latest changes to a file: Git diff file name to see where all the files in the current path have changed: Git
.3.7. Git mergeMerge the downloaded code on the server with the local code. Or merge branches.For example, if you want to merge the dev on the master node, git merge devNote: git merge nov/eclair_eocket (merge eclair_eocket branches of the git repository on the server to the local branch)
Linux diff and patch diff have many options, but here we only introduce the three most commonly used. For other options, let's look at man diff:-r: recursively comparing files in folders-N: if a comparative file does not exist, it is regarded as an empty file-u: uniied. The result of diff is formatted and output (more
Common git commands and git commandsCommon Git commands
View, add, submit, delete, retrieve, and reset the modified File
Git help
Git show # display the submitted content git show $ id
Git
command every day (33): df command http://www.2cto.com/os/201212/174434.html One linux command every day (34): du command http://www.2cto.com/os/201212/174701.html One linux command (35) every day: ln command http://www.2cto.com/os/201212/174993.html The diff command is an important tool in linux. it is used to compare the content of files, especially files of different versions, to find the changes. Diff
, especially compare two versions of different files to find the change. Diff prints the changes of each line in the command line. The latest diff version also supports binary files. The output of the diff program is called a patch. Because there is a patch program in the Linux system, the content of the. c file can be updated to B. c according to the
Overview
When using Git for source code maintenance, it is often possible to view the differences before each code version, such as Git diff before committing the change to see the source file code relative to the corresponding version or remote repository changes. If there is a conflict, you need to merge the changed code into the specified version (for example,
submitted in multiple stages
$ Git add-p
# Delete the workspace file and put it in the temporary storage zone.
$ Git rm [file1] [file2]...
# Stop tracing a specified file, but the file will be retained in the Workspace
$ Git rm -- cache [file]
# Change the file name and put the change in the temporary storage area
$ Git
I. Instructions
1,Git cloneObtain the remote git repo corresponding to a URL and create a local copy. the general format is GIT clone [url]. the cloned repo will be named after the last slash of the URL to create a folder. to specify a specific name, you can use git clone [url] newname.
2.
Git command usage experience and git usage experience
I recently learned about git commands to operate on the database and found that although there are not many git commands (of course not few), they are very powerful in combination, more importantly, many commands have different effects in different States. This blo
show Basic information, filename, and time of two files, where "---" indicates the file before the change, "+++" indicates the file after the change
Third line: @@ -1,2 +1,2 @@ -1,2 Fourth: What is your name? Line five:-my name is Lilei. Line Six: +my name is Hanmeimei. The above four lines are actually similar to what the context format displays, except that the contents of the separately displayed file are merged together to show it, which is simpler. For two files the same content is display
Linux Tour (1): diff, Patch and quilt (bottom) 2 quiltOur own projects can manage all the code with CVS or SVN. But sometimes we use projects that other developers maintain. We need to change some files, but we cannot submit the code directly to the version number management tool. It is inappropriate to rebuild the entire project with version number management tools, because most of the code is maintained by others, such as the Linux kernel. We just w
. gitignore file automatically generated when you create an android project in [email protected.
View File changes: Add git diff to a file and save it temporarily after modification. Use git status to view the changes:
To view the updates of files that have not been saved, enter git
First, Introduction The diff command is used to compare the contents of a file and is an integral part of the version control tools such as SVN, CVS, and Git. Second, the grammar -A or--The text diff preset will only compare a textual file by line. -B or--ignore-space-Change does not check for differences in space characters. -B or--ignore-blank-lines does not c
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.