--no-ff parameter can be combined with the normal mode, the merged history has branches, can see that there has been a merger, and Fast forward merge will not be seen to have been merged. (8) Staging management: When fixing a bug , we fix it by creating a new bug Branch, then merging and finally deleting the branch. When the work is not finished, first put the work site git stash , and then go to fix the b
Restore"Git checkout--Create SSH Key$ ssh-keygen-t rsa-c "[Email protected]"Associate a remote warehouse Xx.git remote Warehouse AddressGit remote add Origin xx.gitThe first time you push all the contents of the master branchGit push-u Origin MasterTo clone a warehouse, you must first know the address of the warehouse and then clone it using the git clone command. GIT
The specific method is as followsGit pull Origin branch // error occurred git stash // Restore git stash ClearDevelopers often encounter this situation: It took a few days to do a new function, has changed almost more than 10 files, suddenly a bug needs to be resolved urgently, and then to a build test group. It's of
named "test:
$ git push ssh://example.com/project.git test
For remote version libraries that frequently communicate, there is a quick command version:
$ git remote add example ssh://example.com/project.git
$ git push example test7. Maintenance of the version Library
Check for damage:
$ git fsck
Repackage and delete us
commits, you need the following command
1
git rebase -i HEAD~2
Using this command, you will enter an interactive interface that shows the last two commits, and asks you which to compress. The ideal state is your pick last commit and commit it and the previous one squash .Next you will be asked to fill in the descriptive information for the combined submission. This process actually overrides your commit history.8. Save
Features:
1. You can quickly switch between project branches.
2. roll back the version of a branch.
3. You do not need to modify the configuration file (defined for projects) for each branch switch)
4. You do not need to create/switch virtual directories/domain names because they are all in the same directory.
5. Are these attractive to you? If you like it, join in.
What is git?
Git is
Display the differences between each update in patch format
-- Stat
Displays the statistics of each file update.
-- Pretty
Display Historical submission information in other formats
-- Oneline
Show only one row
-- Author
Only displays submissions related to the specified author
-- Committer
Only displays submissions related to the specified submitter
-- Since/after
Displays the submission after th
distant library
Git push–u (not required for the first time with-U) Origin master pushes the current master branch to the remote library
git clone https://github.com/idoxu/testgit cloning from a remote repository
git checkout–b dev Create dev branch and switch to Dev branch
Git branch view all current branches
configured remote warehouse and the corresponding address git remote -v Add a remote repository git remote add [remote-name] [url] Capture data from a remote repository git fetch [remote-name] [branch-name] Push data to a remote repository git push [remote-name] [branch-name] View a remote warehouse information
--NO-FF parameter, which means that Fast forwardis disabled:" Merge with No-ff the DevMerging branches, plus the--NO-FF parameter can be combined with the normal mode, the merged history has branches, can see that there has been a merger, and fast forward merge will not be seen to have been merged.First of all, the master branch should be very stable, that is, only to release the new version, usually do not work on it;So where do you work? Work on the Dev branch, that is, the dev branch is unsta
synchronize with the server
Git stash
Git stash apply first stash local modification, then execute git pull -- rebase synchronization, and then apply to restore the modification.
Git r
commit version, where C is the version number is BBAF6FB5060B4875B18FF9FF637CE118256D6F20, we executed the ' Git reset bbaf6fb5060b4875b18ff9ff637ce118256d6f20 ' so there's only a-c three committed versions left.git stash: Put the current uncommitted work into the GIT work stack, when the time is ripe to apply back, here for the moment to mention the use of this
simple classification of GIT operations, as follows--
Remote Repository class: Git clone/remote/pull/push/rebase/fetch
Branch class (including tag): Git Branch/tag/checkout/stash
Information lookup: Git status/log/diff
Local normal operation:
-commitWhen a bug is temporarily modified, to ensure that the current workspace looks cleanTo store the current unfinished work site.Git stashView a stored workspacegit stash List[Email protected] {0}: WIP on b1:38b2a71 Modify p.phpRecovering a stored workspacegit stash apply [email protected]{0} (after recovery stash content is not deleted) need to use
simple classification of GIT operations, as follows--
Remote Repository class: Git clone/remote/pull/push/rebase/fetch
Branch class (including tag): Git Branch/tag/checkout/stash
Information lookup: Git status/log/diff
Local normal operation:
First step: Build Git WarehouseCD to your local project root directory, execute git command
Git init11
Step Two: Add all the files from the project to the warehouse
git Add. 11
If you want to add a particular file, just replace it with a specific file name.
Step three: Commit the Add file to the warehouse
)7) Push Branchgit push Origin master: (pushes content from the master branch locally to the remote Library origin)8) Git Pull: (from a remote crawl branch)12.git Checkout-b DevCreate Branch Dev, equivalent to the following two commands:git branch Devgit checkout dev13.git Checkout Master: (cut back to master branch)14.git
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
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.