Branchgit br Git br-v # View the last commit information for each branchgit br--merged # View branches that have been merged into the current branchgit br--no-merged # View branches that have not been merged into the current branchGit Co Git co-b git co-b Git Co $id # Checkout A history commit record, but without branching information, switching to another branch will automatically deleteGit co $id-B git br-d git br-d Branch Merging and Rebasegit merge git merge origin/master--no-ff # do not fa
that someone else (except you) is using.Storage (stashing)If you are busy with something, you have to change the text to fix other problems, go to git stash to find the changes stored in the current. However, after a while, you may forget about this stored change. So, I'm trying to keep a storage 0 (like Inbox 0 if there's no storage) rule. Every time I store a dollar signal appearing on my output, and I check through git
branches to the current branch git merge origin/master -- no-ff # Do not merge Fast-Foward, so that you can generate merge to submit git rebase master
# Rebase the master database to branch, which is equivalent to: git co
Git rebase master git co master git merge
Git patch management (convenient for development and synchronization on multiple machines)
Git diff> ../sync. patch # Generate the patch git apply ../sync. patch # patch git apply -- check ../sync. patc
, change the contents of the Qiang.txt inside the Wang Branch, and then submit the Qiang.txt for merging
3. If the master branch changes what we want, you can edit the Qiang.txt content, change it to the one you want, then commit, switch to the Wang Branch, and then merge the Master branch to the Wang Branch. The branch name followed by the merge must be the newest branch.
4. Git branch–d Wang//delete branch
5. Git Branch–d Wang/If the branch is not merged, force delete
Principles of using bran
use git checkout-file.txt undo the changes;If you not only change the mess, but also commit to the buffer, then commit to the buffer, then git reset HEAD file.txt, git checkout--file.txt;If you're messed up and you've committed to the repository, you'll need a fallback version of git reset--hard 123SDAIf you mess up and commit to the remote code base,Remote code Base1. git clone [email protected]:test.git clone code base2. Git remote add origin [email protected]:test.git create Remote code libr
objectGit rev-parse v2.0 # Internal command: Displays the SHA1 HASH for a refGit Reflog # shows all commits, including orphaned nodesgit show [email protected]{5}git show [email protected]{yesterday} # shows the status of the Master branch yesterdaygit log--pretty=format: '%h%s '--graph # Diagram commit LogGit show head~3git show-s--pretty=raw 2be7fcb476Git Stash # Staging current changes, all to the head stategit
Branchgit br Git br-v # View the last commit information for each branchgit br--merged # View branches that have been merged into the current branchgit br--no-merged # View branches that have not been merged into the current branchGit Co Git co-b git co-b Git Co $id # Checkout A history commit record, but without branching information, switching to another branch will automatically deleteGit co $id-B git br-d git br-d Branch Merging and Rebasegit merge git merge origin/master--no-ff # do not fa
. /sync.patch #测试补丁能否成功Git staging managementGit Stash # Staginggit Stash List # column all stashgit stash apply # recover staged contentgit stash Drop # Delete Staging areaGIT Remote branch ManagementGit pull # Crawl all branches of remote repository update and merge to localGit pull--no-ff # Crawl all branches of rem
The following is my work in the common use of the Linux command, recorded, convenient for daily work to learn to look through.Git Management code"System Actions"CD Entry DirectoryCD ~ Back to the root directoryLS View the files in the current directoryLess view a file contentPS aux |grep java view all Java processesNETSTAT-NTLP to view the currently running portsVI Editing filesRM Delete file (rm-r Delete folder)Top view current system load informationFree-m viewing the memory of the current sys
Header file/*** book: "thinkinginc++" * Function: Example of overloading * Time: August 28, 2014 16:03:37* Author: cutter_point*/#ifndef stash3_h_included#define Stash3_h _includedclass stash{ int size; The number of bytes used to represent the data to be saved int quantity; Total number of memory blocks int next; The number of objects already stored, used to indicate where the next empty place //Dynamic request array size is byt
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 use of branching to complete a task, deleting branches after merging, and working directly on the master branch is the same effect, but the process is much more secure, because in these processes
(1) git blame filename
The command displays the creator of the file name, as well as the final commit and timestamp.
。
(2) Git reflog
This command displays the information that the head pointer moves. He is local, not part of your warehouse. Will not be included in the push and merge. If I use Git log, the submission information I get is part of my warehouse.
。
(3) Git stash
Save your current changes in your workspace for the time being. The workspa
forward using the –NO-FF parameter
Git merge--no-ff-m "merge with No-ff" Bug Branch, hide work interval
git stash//hide the current working area
git stash list//view stash list
git stash apply Forcibly Delete as merge branch
git branch-d
Remote BranchNew Remote Branch
Git push Origin branch-name:branch-name
//pus
your changes or stash them before you can merge.
Aborting
Prompt to stage local modifications to pull new code on the server
Click Storage (English version: Stash), any name, which is stored in the distance from the last server version to local changes between the differences, do not delete, the merger succeeded and then deleted.
Pull pulls the server code, and at this point the local code becomes the cod
diff--cached
This allows you to take a look at the modification details before commit.
5. Do not create a synchronization of useless merge
There is a situation where a branch is dedicated to synchronizing code provider code, and if the general pull will constantly produce a merge that looks annoying, adding a--rebase with the use below will not create a useless merge.
$ git Pull--rebase Origin master
6. About Stash
Application: After doing the modi
Excerpted from: CSDN Inverse cheersGit in pull, when this error occurs, many people may enter the stash, related stash see: Error pulling Origin:error:Your local changes to the following files would be overwritten by mergeBut after discovering stash still appears: Error pulling origin:error:The following untracked working tree files would be overwritten by merge
send mail to the webmaster ([emailprotected]), giving this error message and the time and date of the error.
Through the error message, I think that by controlling the "foorbar" character, try to inject ";", you may be able to inject malicious Perl code to run: D. to verify my ideas, I use.
#!perlif (!Gv_AMG(stash)) { const char *package = HvNAME_get(stash); TRACEME(("No overloading defined f
1. After you have created the branch locally, you can push the branch locally
2. After creating a branch on a Web page, get the branch by using git fetch
Delete Remote branch
git push Origin--delete the branch that needs to be deleted, then others need git fetch-p
If they need to update the branch
git supplemental knowledge
Save the current Job site
Using git
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.