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
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 deleteGi
the branch that is currently pointing: Git branch Lists all the branches, and the branch that is 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 Branch
# View Remote 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, bu
# View Remote 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, bu
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
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 bran
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 bran
Git pull remote branch and merge to localgit fetch pull remote branch does not do merge ignore file. Gitignore Add file git Add. Commit all modifications git commit-am ' memo info ' push local branch to warehouse GIT push origin master:master Delete remote Branch git push or
git Add. : He will monitor the status tree of the workspace and use it to submit all changes to the staging area, including file content modification (modified) and new files, but excluding deleted files.
Git add-u: He only monitors files that have been added (i.e., tracked file), and he submits the modified files to staging area. Add-u does not submit new files (untracked file). (
to partition 2. View the branch that is currently pointing:git branch lists all the branches, and the branch that is currently pointing to has more than one * 3, switch branch is git checkout branchname 4. Merge branch:git merge branchname merge branchname to current branch 5. Delete branch:git branch-d branchname delete branchname BranchNote: creating, merging, and deleting branches is fast, andgit encourages the use of branching to accomplish a
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 add [file name ] Add a file to git indexgit commit-v when you use the-v parameter you can see the difference in commit git commit-m "This is the message describing the commit" to add a commit message Git commit-a-A is on behalf of Add, add all the changes to Git index a
branch of git is master.
# Create a new branch$ Git branch # To see a list of all branches in the cureent repoitory$ Git Branch# If you want to switch to another branch you can use$ Git checkout # To create a new branch and switch to it in one step$ Git checkout-B # To dele
finally deleting it, and when the work is not done, first put the job on the spot git stash , then fix the bug, fix it, and go back to the git stash pop job site.
To develop a new feature, it is best to create a new branch; If you want to discard a branch that has not been merged, you can remove it by
.; Git add-u;Git add-a4. Submission:(1) From staging area I to local warehouse Lgit commit-m [Submit message](2)5. Revocation(1) From staging area I to work area Wgit rm--cached (2) Revert to head versiongit reset--hard HEAD(3) Modify the submitted user name informationgit commit--amend--author= "author Name 6. Remote(1) Change the remote warehouse addressgit remote Set-url origin http://xxx.xx.com/x.git(2)
/refs/tags/old_practiceAfter you take a photo, you can execute the git describe command to display the latest commit as an easy-to-remember name.The most recent milestone from the submission is selected as the "base version number", followed by the identity distance "base version"and an abbreviation for the SHA1 hash value of the commit. Because the latest submission was hit by a "milestone".So the name of the milestone is displayed directly. This tec
aNewBranch ' MX1/TEYES/T7 '[email protected]/f/sptsrcgit/factorytest (mx1/teyes/T7) $ git statuson branch mx1/teyes/T7your Branch is up-to-date with ' origin/mx1/teyes/t7 '. Nothing to commit, working directory cleanUsing "Git checkout-b ...", parameter-B is the creation of a branch, and the above instruction achieves the purpose of creating and switching branches.5. Save the changes to the current branch
merged.
4.4 Git push
Synchronizes the local code base code to the remote library.
V. Code staging
Scenario: Feature unfinished and not commit, but need to restore code to last commit (for example, Emergency bug fix)
5.1 git Stash
Staging the uncommitted code and restoring all modifications
5.2 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.