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,
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
If there are some configuration files on the system that have been configured on the server and then later developed and then added some new configuration items,
A code violation occurs when this profile is published:
Error:your local changes to the following files would is overwritten by merge:protected/config/main.phpPlease, commit your changes or stash them before you can merge.
If you want to keep the changes made on the production server, simp
When you use git pull code, you often encounter conflicts such as the following:
Error:your local changes to the following files would is overwritten by merge:Dpcm/src/struts.xmlPlease, commit your changes or stash them before you can merge.
In this case, you can use the following steps to resolve
First: Store files that are locally conflicting with the server first.
$ git stash
Second: Use the
[variable name]:[branch name]This command deletes the branch on the remote repository.Git pullUsage: git pull [Repository Link]This command extracts and merges changes from the remote server into your working directory.Git stashUsage: git stash saveThis command temporarily stores all modified trace files.Usage: git stash popThis command restores the most recently hidden files.Usage: git
something that looks real on the surface. Prototypes make the product realistic enough, and prototypes are used to demonstrate the order of requirements. When we use prototyping techniques, we must try to use artifacts and experiences that are familiar to users. The low-fidelity prototype uses the user-familiar media to help the user focus on the subject matter; high-fidelity prototypes are created through
First, WiFi-related basic concepts1. What is WiFiLet's take a look at how Baidu Encyclopedia is defined:Wi-Fi is a technology that can connect computers, handheld devices (such as pads, mobile phones) wirelessly to each other, in fact a high-frequency wireless signal . [1] Wireless is really a wireless network communication technology brand, held by the Wi-Fi Alliance. The aim is to improve interoperability among wireless network products based on the IEEE 802.11 standard. a local area network u
/learngit.gitSecond, git common commands"Basic Command"
mkdir creating a File cd file entry
Git init turns this directory into a repository that git can manage, generating. git files
git add readme.txt Adding files to the repository
Git commit-m "whrote a Readme file" submitted to the warehouse
Git status check the current state of the repository, tell Readme.txt to modify it, but not ready to commit
Git diff readme.txt display changes similar to Linux diff command
Git log shows
: master. You can view the status of the version library.$ Git status
2. add files to version library management (add)$ Git add. # add all files$ Git add filename # add a specified fileYou can also use git add to modify files.
3. Submit changes (commit)Use the commit command to submit the changes. remarks are required.$ Git commit-m "description"
4. Temporary changes (stash)Store changes that have not been submitted in the workspace to the temporary s
lack of any library files to install the appropriate library files.2. "Make make install", I encountered a troublesome error, yesterday afternoon the whole afternoon was not resolved, so the article is mainly to share this error and write.Error content: makefile:797: * * * must install Libyuv-dev to build MOD_FSV. Stop it.Solution:(1) Download LIBYUV source code and compileCD Freeswitch/libsgit clone https://freeswitch.org/stash/scm/sd/libyuv.gitCD
branch and switch to the pastgit Co-b #Create a new new_branch based on branchgit Co$id #Checkout A history commit record, but without branching information, switching to another branch will automatically deleteGit Co$idb #Checkout A History submission record and create a branchgit br-D #Delete a branchGit br-d #Force a branch to be removed (a branch that has not been merged will need to be forced when it is deleted)Branch Merging and Rebasegit merge # Merge branch branches into the c
can be discarded
The command git reset HEAD file can undo the staging area modification (unstage), re-put it back in the workspace, and then use git checkout -- file the discard work changes.
The command git rm is used to delete a file, and if it is found mistakenly deleted, replace the version git checkout -- file in the workspace with the version in the repository, which can be restored with one click, regardless of whether the workspace is modified or deleted.
git branch -b T
1. In the event of a conflict, the following information is indicated:' c/environ.c ' would is overwritten by merge. Aborting.please, commit your changes or stash them before you can merge.This means that there is a conflict between the updated content and the locally modified content, either by committing your changes or by temporarily storing the local changes first.The process is very simple, mainly using the git
repositoryFor example:If the user works in a 8705c repository, the remote repository for 8703c is aliased:git remote add 8703C [email protected]:~/repo/8703c-ap.gitThen, you can get any branch of 8703c by using the alias 8703C in the 8705c version of the repository.git fetch 8703C//sync 8703c to 8705c version LibraryGit branch-a//Display all branch information for 8703c and 8705cgit chekcout--track 8703c/branch_aPull the remote branch of 8703C to the local repository of 8705c,and automatically
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 fast-foward merge so you can ge
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.