git branch xxx new branch XXX
Git branch-a View all branches (including remote)
Git branch--set-upstream-to remotes/origin/xxx the current branch to the remote branch XXX
git checkout-b xxx remotes/origin/xxx maps remote branch xxx to local branch xxx (git pull is needed later)
Discard local modifications, forcing overrides using content from remote libraries
git fetch--allgit Reset--hard origin/mastergit fetch simply downloads the contents of the remote library and does not do an
information for each branch
git br--merged # View branches that have been merged into the current branch
git br--no-merged # View branches that have not been merged into the current branch
Git 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 delete
Git co $id-B
git br-d
git br-d
Branch Merging and RebaseC code
git merge
git merge origin/master--no-
Git local repository synchronized to remote repository$ git Remote add Origin http://github.com/powfulCsharp/NuUserControl.git$ Git push-u Origin MasterClone a remote repository to a local using git clone +urlCreate a branch in a remote repository with git branch+ branch name to move out of branch with git checkout + branch nameUsing git add filename git commit-m "" will not find changes when switching to the main version after modifying the file on the branchMerge the changes in the branch into
bug -- 013. Fix the bug, merge the bug branches, and delete the bug branches.Git merge bug -- 01Git branch-d bug -- 014. Go back to dev, view stash, delete stash, and continue to work.Checkout devGit stash listGit stash apply recoveryGit stash pop recovery and Deletion5. Fo
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: Git add/commit/rm/merge/reset
Here is just my personal classification, everyone has a different classification of it, welcome to add.What you need to emphasize is that you need to have
processed
Git push Origin branch name
11. Submit the Merge Request
After submitting the merge request, the code approval team colleagues will review the submitted code, and no problem will agree to merge requests and merge the code from the test branch into the master branch
Git using tips
The use of Stash
Sometimes there is a scenario where you develop a feature on a local branch and there is an urgent bug that needs to be handled,
pipelines are implemented " The previous standard output is used as the following standard input "Xargs is to achieve " to use standard input as a parameter to a command "Contrast:Ind/sbin-perm +700 |ls-lFind/sbin-perm +700 |xargs ls-lParameters and Usage:-0: When the Sdtin contains special characters, it is treated as a general character, such as "space", etc.# echo "//" |xargs-0 echo > aaa# echo "//" |xargs echo > bbb# cat-a aaa//$$# cat-a
This article mainly introduces several methods to debug Python code. This article comes from the technical documentation on the IBM official website. For more information, see
Use pdb for debugging
Pdb is a python package that provides an interactive source code debugging function for python programs, main features include breakpoint setting, single-step debugging, function debugging, viewing current code, viewing stack fragments, and dynamically changing variable values. Pdb provides some comm
Regular dishes (continue for help) aaa. bbb. ccc. ddd $ aaa. bbb. ccc. ddd... aaa. bbb. ccc. how to replace ddd with regular expressions with aaa. bbb. ccc. ddd $. b. c. d... aaa. bbb. ccc. I didn't ask a question for ddd twice. ------ solution ------------------ try it firs
On a, with GPIO direct power to the LED, with high and low level for switch, not reliable. A GPIO is a signal, not a power supply. Moreover, a GPIO can only give poor 5mA or so, take more will burn (I did not burn do not know if it is really going to burn, but the instructions above is written). This is not playing, so I did the following transistor experiment. 2N3904 parameters please click here. This is not recommended, LCM is 200mA, but I only have it, no way. Transistor, I use it as a switc
Special characters selected:
# ID. Indicates class* Select all, Select multipleSpace descendant> Sub-~ Brother+ Next: Sub-function)() Functional filtering and searching
Get all the title objects under the DIV: $ ("Div: Header ")CopyCodeThe Code is as follows:
Get all title objects: $ (": Header ")Copy codeThe Code is as follows:
get first, for example, $ ("Li: First") or $ ("Li "). first () or $ ("Ul: First") or $ ("Ul Li: First") copy Code the code is as follows:
AAA
[grep profile : ]grep is used to filter lines that contain specific charactersusage: grep ' pattern ' fileFor example: grep ' BBB ' aaa.txt--color # Search for the keyword BBB from the file Aaa.txt and highlight it.[Regular meta-character : ]grep can be used in conjunction with regular expressions, the following describes the use of some commonly used regular expression filter characters . 1. ^ Denotes
#成员的种类: Normal field static field normal method static method class method General characteristicsClass FFF: x= ' xxxxxdddd ' __x1= ' x11111111 ' __ ' is a member modifier, and X1 is the modified variable field that is only accessed internally def __init__ (self): Print (' 111 ') Self.__name= ' name222 ' #这个name依旧是那个私有的字段 is still not to be called def fetch (Self,bak): Print (BAK) Print (FFF.__X1) def __call__ (self, *args, **kwargs): Pri
Tags: OCA script summary Pytho class ALS Erro turn code snippetThe debug feature is very important for developer, and Python provides the appropriate module PDB so that you can debug with a text editor to write scripts. The PDB is the abbreviation for Python debugger.Some of the commonly used commands are:Command useBreak or B to set a breakpointContinue or C continue to execute the programList or L view the code snippet for the current rowStep or S entry functionReturn or R executes the code un
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: Git add/commit/rm/merge/reset
Here is just my personal classification, everyone has a different classification of it, welcome to add.What you need to emphasize is that you need to have
with a distant libraryGit push–u (not required for the first time with-U) Origin master pushes the current master branch to the remote librarygit clone https://github.com/tugenhua0707/testgit cloning from a remote repositorygit checkout–b dev Create dev branch and switch to Dev branchGit branch view all current branchesGit checkout master switches back to the master branchgit merge dev branches on the current branchgit branch–d dev Delete Dev branchGIT branch name to create a branchGit
fallback to 100 versions, use Git Reset–hard head~100)Cat xx View XX file contentsGit reflog View history's version number IDGit checkout-xx all the changes to the XX file in the workspace.git rm xx Delete xx fileGit remote add Origin https://github.com/tugenhua0707/testgit associated with a distant libraryGit push–u (not required for the first time with-U) Origin master pushes the current master branch to the remote librarygit clone https://github.com/tugenhua0707/testgit cloning from a remote
kout-** the xx files in the work area of the changes are all revoked. 5 git checkout–b dev create dev branch and switch to Dev Branch 6 git checkout Master switch back to Master branch 7 git branch–d dev remove Dev branch 8 git Merg E Dev merges the Dev branch on the current branch 9 git push--set-upstream origin Dev commits the modification and creates the remote branch dev--Hidden files1 git stash hide the current job and wait
Branch
git br
Git br-v # View the last commit information for each branch
git br--merged # View branches that have been merged into the current branch
git br--no-merged # View branches that have not been merged into the current branch
Git 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 delete
Git co $id-B
git br-d
git br-d
Branch Merging and RebaseC code
Git initgit Add Filegit Add.git commit-m "notes"git logGit refloggit statusgit diff (Git diff HEAD--file)git reset--hard head~1 fallback last Commitgit reset--hard Commitid fallback to a commitgit checkout--file Discard workspace ModificationsGit reset HEAD file staging area fallback workspacegit rm file Delete filesGit Branch View branchesgit branch dev Create Dev Branchgit checkout dev switch to Dev branchgit checkout-b dev Create and switch to Dev branchgit merge dev merges the Dev branch to
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.