First, use Git branch to create a branchUsage Scenario: No experience at the momentGit branch-a Show All branchesGit branch xx create XX branchgit checkout xx switch to XX branchGit checkout-b xx Create and switch to XX branchSecond, use Git stash save and restore work progressUsage scenario: Develop a new feature that has not been developed yet, but need to fix a bug urgently, you can save this progress, f
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 stash apply to recover hidden files, but the content is not deletedgit Stash Drop Delete fileGit stash pop re
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 the current job and resume work after resuming
Common git commands
Find a good summary blog, please refer to: http://blog.csdn.net/ariesjzj/article/details/7747876
Git Add: tracks new files, stores tracked files in the temporary storage area, and marks conflicting files as resolved during merge.Git status: Check the current file statusGit DIFF: compare the difference between the current file in the working di
git logGit log-p: Show the differences for each commitGit log-p-X (x number of times, integer): Specifies the number of times the variance is displayedgit log--stat: Displays a brief count of incremental row countsgit log--author= cold Jiang: Show a commit record for an authorGit checkoutGit checkout--* * (file): Revert to file modificationGit checkout-b master remotes/master: Establish a local branch to the server and switch the pastgit branch-d: Del
There is a requirement for the project to obtain a list of files that are push to the remote repository and to perform a specific analysis of the files. It's natural to think of using git hooks to trigger a script to get a list of files. More anxious to use this feature, use Python with some git
Sublime selecting tags and their contentsCtrl+shift+a Continuous Press two timesGit undo AddResets the specified file for staging area, consistent with the last commit, but the workspace remains the samegit reset [file]Undo CommitResets the specified file for staging area, consistent with the last commit, but the workspace remains the samegit reset [file]Reset staging area to workspace, consistent with last commitgit reset--hardView git historygit log
git clone [email protected]:jiet213/ui_main_function.git//Copy remote file repository to localgit status//view project status informationgit Add. Adding locally modified filesGit commit-m. Submit a local modification fileGit push origin master//push local repository to GitHubGit pull Origin master//pulling from GitHub to the local source repositoryGit branch//View Project BranchGit checkout-b host//Add a branch named hostgit checkout master//switch to
text in the current word match eitherI: Inserting text at the beginning of a lineO: Insert a blank line after the current lineO: Insert a blank line before the current line: Wq Command mode, execute save to exit operation: In w command mode, perform a disk operation: w! Command mode, perform a forced disk operation: Q Command mode, perform exit VI operation: q! Command mode, perform a forced exit VI operation: E filename Command mode, open and edit files: n Command mode, if multiple files are o
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.