We have successfully added and submitted a Readme.txt file, now it is time to continue working, so we continue to modify the Readme.txt file and change it to the following:
Git is a distributed version control system.
Git is free software.
Now run the git status command to see the results:
$ git Status
# on branch Ma
git add-u/-a/-p
git pull remote-mirror local-master
Export Commit history (that is, generate patches from an existing code):
Initialize G It repository ... (This step can actually be time consuming, if the code is large)
git tag v1
git commit-a
Git three, git in the third
1. Status Command and diff command
Before we have successfully added and submitted a Readme.txt file, modify the Readme.txt as follows:
echo "Git is a distributed version control system." > Readme.txtecho "git was free software." >> Readme.tx
.) 1. Installation: $ sudo apt-get install git $ sudo apt-get install gitk # This is the official graphic interface for installation, do not install unnecessary. 2. Run cd to the Code to be managed, the first-level directory where the file is located. 3. initialize: www.2cto.com $ git init 4. Add all content in the current directory: $ git add. 5. view the statu
modified, the modification records can still be viewed through git status and git diff. Why? Is the ignore file invalid?
Ii. view the modified content: (before submission)
Git is better designed than other version control systems, because Git tracks and manages changes rat
Related articles: about verifying that there is an SSH configuration and how to generate SSH key can refer to the article: Git usage manual: Generate SSH Key
For the use of SSH key and the configuration of the public key in GitHub, Gitlab, please refer to the article: Git manual: Use SSH key and configure the SSH key public key to the concepts and relationships of Git
: Git status View changes to files in the local workspace, registers
For the use of Git diff and git add commands, please refer to the article: Git Usage manual: Git diff,
to tell you:
$ Cat. git/HEAD
View development changes and differences of projects
This section describes several useful commands for viewing the development and changes of the project's version library and differences:
Git-show-branch
Git-diff
Git-whatchanged
The
operating system is used, which can typically be Vi or Vim. If you have other preferences, such as Emacs, you can reset them:1 $ git config--global core.editor emacsVariance analysis ToolThere is also a more common use of the diff analysis tool when resolving merge conflicts. For example, to use Vimdiff:1 $ git config--global merge.tool vimdiffGit can understand
Git 3 and git 3. Details are as follows: echoGitisadistributed git 3 and git 3
1. status and diff commands
Previously, we successfully submitted a readme.txt file and modified readme.txt as follows:
echo "Git is a distributed ve
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
Pushing a branch to a remote warehouse usually serves two purposes:: 1. Collaborative development by multiple people 2. Remote Backup
In fact, commit is also a kind of "backup", but it is only local, you can use git reflog to repent. Do not use git reset head -- hard or git checkout-F and Other Dangerous commands if no backup is performed.The importance of commit
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
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
fact, Git checks whether there is a file named. if a gitignore file exists, read the content of the file in one row and exclude the specified files or directories in each row from version control. Note that the "*" wildcard can be used for the specified file or directory in the. gitignore file.
[STEP]
Now, create a file named. gitignore under the root directory of the GitTest project, and then edit the content in the file. As shown in:
In this way,
Git 3 and git 3
1. status and diff commands
Previously, we successfully submitted a readme.txt file and modified readme.txt as follows:
echo "Git is a distributed version control system. " > readme.txtecho "Git is free software." >> readme.txt
Run the
General overview
diff [Options] source file destination file
Describe
In the simplest case, diff compares the contents of two files (source and destination files). The file name can be-text read by the standard input device. As a special case, diff--Compare a standard input to its own copy if the source file is a directory and the destination file is not (a di
profile is the one in your home directory, and all of your projects will default to the user information configured here. If you want to use a different name or email in a particular project, just remove the --global option to reconfigure it, and the new settings are saved in the current project's .git/config file.Text EditorThe next step is to set the text editor to use by default. Git will automatically
# Switch slave to master
Git checkout-B New-branch master # Create a New-branch from the master and switch it over New-branch at the same time
Git checkout-B newbranch # create a new branch based on the current environment
Git checkout-B newbranch origin # create a new branch based on the origin
Git checkout filen
information . git log--author=[author name] can specify the author's commit history . git log--s Ince--before--until--after filter log. --no-merges based on submission time you can exclude the commits of the merge . git Log--grep filter log:git log--grep=keywords By default, git log--grep--author is the or relat
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.