for all branch history # git revert modification corresponding to the submission history # undo commit dfb02e6e4f2f7b573337763e5c0013802e3 92818git ls-tree HEAD # Internal Command: display a git object git rev-parse v2.0 # Internal Command: Display SHA1 HASHgit reflog for a ref # Show All commits, including the isolated node git show HEAD @ {5} git show master @ {yesterday} # display the status git log of the master branch yesterday -- pretty = format: '% h % s' -- graph # submit the log git sh
environment where a cache variable is used to cache all generated Namespaceobject objects.
A Namespaceobject object contains three attributes, stash (record current namespace), Fqn (namespace name), Proc (Createprocedure object). Methods include: Enqueue,call,valueof,merge,getstash,getexport
Copy Code code as follows:
Namespaceobject var = function _private_class_of_namespaceobject (FQN) {
Merge (this, {
First, the emergence of the prototype:> Past software features a single, not much business.> Now the software features complex, user needs more.> tap the actual needs of the user.Reduce communication costs between > Project teams.Second, the classification of the prototype:1. Sketch prototype, describe the product approximate demand, record the instant inspiration2. Low Fidelity prototype, display system's approximate structure and basic interaction e
can visualize the final form of the product visually through the "use" prototype, Consider whether the prototype reflects its real needs, so that customers can naturally participate in the design, thus achieving the second goal of the prototype.
Usually we divide the prototype design into two phases, "low-fidelity prototype" and "High-fidelity prototype". The role of "low-
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
modification and creates the remote branch Devgit push Origin Zyf-dev the current branch Zyf-dev Push to remote (the remote repository does not give the branch a new branch is created)--Hidden files1 git stash hide the current job and wait to resume the scene after resuming the live 2 git stash list view all hidden files Listing 3 git stash apply recover
–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 stash to hide the current job and resume work after resuming the site.Git stash list view all hidden file listsGit st
"XX" commits a file –m followed by a comment.Git Status View warehouse statusgit diff xx View xx file modified those contentgit log View historygit reset–hard head^ or git reset–hard head~ fallback to previous version(If you want to 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
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 stash to hide the current job and resume work after resuming the site.Git
Level four modeWorkspace Staging Area local warehouse remote Warehousegit config--global user.name "YourName"git confit--global user.email "Youremail"Git initgit Add FileGit commit-m "somecomments"git statusgit diff file to see the difference between the workspace and the local warehousegit log--pretty=onelinegit reset--hard head^ (head~100)git reset--hard 123456 (version number)Git refloggit diff HEAD--The difference between the latest version of file and the workspaceGit checkout--the same as
Recently encountered a problem, things are like this, just received a customer said his project has a problem, so open the local source view after the troubleshooting to determine the problem, and then began to fix the problem to get ready to commit to git to find the current branch is not right, But the problem is that I have made a lot of changes in the current branch, and if you want to switch branches, you must first commit the modified files. So now the question is: how do I switch branches
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-
delete branchesC code
Git br-r # View Remote 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-
time with-u) originmaster push the current master branch to the remote libraryGit clonehttps://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 mergedev merges the Dev branch on the current branchgit branch–d dev Delete Dev branchGIT branch name to create a branchGit stash to hide th
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.