Git for detailed use, git for use1. Git Concept1.1 The Git library consists of three partsGit repository is that. the git directory stores the submitted document index content. Git can
current version.Make-J6# If the libiconv. So library cannot be found, set the soft connection.Ln-S/usr/local/lib/libiconv. so.2/usr/lib/libiconv. so.2
Make install#Test whether the installation is successfulGit
#
Simple configuration of gitosis
After git is installed, we need a server (or git hub to start using GIT)
Git is a tool and a science, and it depends on you how you want to learn and how you use it.
What I'm talking about here is the basic requirements that we can get started using git and actually realize the benefits of git.
First, download the installation
Very simple, can see Baidu tutorial
operation).Add:Changes that are not added to the local repository in the staging area and workspace are not part of a branch, and when you switch a branch, use git status to see that the unsaved changes are still there, so the git stash command appears to keep those changes that you don't want to commit.Now that you c
branch dev # Create dev branch git checkout dev # switch to dev branch git branch # View current branch git mer GE Dev -D Dev # Remove Branch devgit Stash
Baidu Cloud SynchronizationBaidu Cloud synchronization, will be a local file directory and the cloud synchronization. If you set this synchronized directory locally as the central server for Git, the contents of the local push-to-hub server will also be synced to the cloud. Other developers will be able to collaborate as long as they have the same settings.Using a remote and native to simulate two developers, install Cloud Sync first.git remote reposi
)git pull (获取仓库的所有更新, 并且自动合并到当前分支)5.2 Uploading datapush [remote-name] [branch-name]ex. git push origin master
git tags
List labels1.1 See all tagstag1.2 Viewing a taggit show [tag-name]
New label 2.1 lightweight tag git tag [tag-name 2.2 Tagged tag git
Use of GIT command line, use of GIT command line
If you know something wrong, give me some advice.
First, I want to know what GIT is. GIT is an open-source distributed version control tool. Among all the distributed version contro
line shows the merged graph,---git log--graph--pretty=oneline--abbrev-commit-An abbreviated submission ID number on one line Git stash-The main use for this branch of the reserved storage, wait until the debugging bug succeeds, then restore the original branch to continue the next workgit
Install Git and use Git to manage personal documents
1.1 install Git
The latest version of Git can be found.
Before installationFirst, make sure that the corresponding dependency package has been installed, mainly including the following:
Zlib
Libcurl
Libcrypto (OpenSSL)
Rs
Objective:GitHub is a git-based code hosting platform, where paid users can build private warehouses, and our general free users can only use public repositories, which means the code is open. This is enough for the average person to have a public warehouse.Steps:1. Register your account and create a warehouseThe first step to using GitHub is, of course, registering a GitHub account. After that you can crea
Read the snow-capped teacher git tutorial today to do some summaryGit Use commandsInitializing the WarehouseGit initSet User name passwordgit config--global user.name "Your name"git config--global user.email "[Email protected]"Add files to a git repository to add multiple files repeatedlygit add Submit FileGit commit-m
Build and use Git servers, and build and use Git servers
Git is a distributed version manager with powerful functions. It was initially developed by Linus. Its version is managed locally and does not need to download the version from the central server as SVN does.
Install
librarygit Add.git rm filename (including path) deletes the specified file from gitgit clone git://github.com/schacon/grit.git to pull code from the servergit config--list See all usersGit ls-files look has been submitted by thegit rm [file name] Deletes a fileGit commit-a commits all changes to the current reposgit add [file name] Adds a file to git indexGit commit-v you can see the difference between a c
currently pointing to has more than one *3, Switch branch is git checkout branchname4. Merge branch: git merge branchname merge branchname to current branch5. Delete branch: git branch-d branchname Delete branchname BranchNote: creating, merging, and deleting branches are very fast, git encourages the
many problems and challenges, as follows: How to start a feature development, without affecting the other feature. Because it is easy to create new branches, branches more how to manage, a long time, how to know what each branch is doing. Which branches have been merged back to the trunk. How to manage the release. How to freeze feature at the beginning of a release, how to prepare release, developers can continue to develop new features. The code on the line has a bug and how to fix it quickly
to go online again. At this time, you can use
Git stash (clean up the current desktop and roll back to the original status. After fixing, take out the desktop and continue code)
Git stash list
Git
a merge. If you want to forcibly delete a branch, you can use the-D optionMerge branch: git merge [name]----Merge the branch with the name [name] with the current branchCreate a remote branch (local branch push to remote): $ Git push origin [name]Delete Remote branch: git push origin:heads/[name] or $ gitpush origin:
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.