switch to another branch without commit modification. So we need to use the stash.git stash backup git stash pop read and resume (pop command no longer has, after apply) git stash list git st
, so with the-m parameter, write the commit description in:$ git merge--no-ff-m "merge with No-ff The Dev"Store" The current Job site:$ git stashview a list of stored work sites:$ git stash listRestore the "storage" work site and also delete the stash content:$
(datetime.datetime.now()))file = request.FILES.get(‘file-xxx‘)App_Log.logger.debug(u‘结束时间: ‘ + utils.datetime2str(datetime.datetime.now()))Then git commit-am ' submitted information ' to resolve the conflict.Finally, you can also synchronize local modifications to a remote git repository: git pushGit pull, there are uncommitted files locallyWhen updating from a r
the submission information for the new commit. This process essentially overrides your commit history.
LweiTranslated 8 months ago1 Person topTop translation of good Oh!
8. Stash UNCOMMITTED changesYou are modifying a bug or feature and are suddenly asked to show your work. And the work you're doing is not enough to submit, and you won't be able to show it at this stage (before you go back to the change). In this case,
changes in the workspace are all revoked, that is, the file back to the last git commit or git add, when the state, mistakenly deleted file recovery.Of course, you can also use the git reset command.git loggit log--pretty=oneline log simplifies displaygit log--graph--pretty=oneline--abbrev-commit branch Merge HistoryGit reflog view connit ID record Historygit lo
README2 # Rename file Readme to README2 git reset--hard Head # Resets the current version to head (typically used for merge failure fallback) git rebasegit branch-d hotfixes/bj VEP933 # Delete Branch hotfixes/bjvep933 (this branch modification has been merged into another branch) git branch-d hotfixes/bjvep933 # force Delete Branch Hotf
line shows the merged graph,---git log--graph--pretty=oneline--abbrev-commit-An abbreviated submission ID number on one line Git stash-The main use for this branch of the reserved storage, wait until the debugging bug succeeds, then restore the original branch to continue the next workgit stash List-used to view the d
, so with the-m parameter, write the commit description in:$ git merge--no-ff-m "merge with No-ff The Dev"Store" The current Job site:$ git stashview a list of stored work sites:$ git stash listRestore the "storage" work site and also delete the stash content:$
Forward模式,导致合并后删除原来的分支后,看不出主分支曾经合并过存档list恢复存档git stash apply 存档id删除存档git stash drop 存档id上面的恢复和删除可以用下面的命令合并操作git stash pop 存档id
When working in the current branch for a period of time temporarily need to switch to another
Found in accordance with the git push stuck to Google, can search a lot of previous peer sent blog has mentioned, but seemingly no solution. This problem has been solved in the latest version of Msysgit, hoping the solution will spread out. Let more programs ape classmates see.=====================Ah ah ah, studied for two days, finally found solution. Go to the shouts for a while=====================The project team used the server to hang up, hard d
file to the previous version: git reset -- hard HEAD ^
View Command records: git reflog
Branch Operations
Create branch: git branch dev
Create and switch to the branch: git checkout-B dev
Switch branch: git checkout master
Del
()))file = request.FILES.get(‘file-xxx‘)App_Log.logger.debug(u‘结束时间: ‘ + utils.datetime2str(datetime.datetime.now()))Then git commit-am ' submitted information ' to resolve the conflict.Finally, you can also synchronize local modifications to a remote git repository: git pushGit pull, there are uncommitted files locallyWhen updating from a remote repository, if t
common-p option to show differences in each submitted content, use-2 to show only the last two updatesGit reset -- hard load an old record and delete all new records.View unsaved updates in git diffGit rm a. a. Remove files (from the temporary storage zone and workspace)Git rm -- cached a. a: Remove files (only deleted from the temporary storage zone)Git commit-
--hard head^ back to the previous version, and if you accidentally change the wrong code, fall back to the previous version and modify it again.Git reset--hard version number refers to the top 5 digits.Git checkout-the file name directly discards the workspace modification and does not do add,commit operation.Git rest headIf it is already commit, the version is rolled back directly.Branchgit checkout-b git chekout
束时间: ‘ + utils.datetime2str(datetime.datetime.now()))Then git commit-am ' submitted information ' to resolve the conflict.Finally, you can also synchronize local modifications to a remote git repository: git pushGit pull, there are uncommitted files locallyWhen updating from a remote repository, if there is a file a that is not commit locally, the remote reposito
be resolved first. After the conflict is resolved, the merge is completed.
Use git log -- graph to view the branch merge graph.
* Save the work site git stash. After saving, you can perform other work without affecting the last modification.
Recovery site: 1. The content in stash is not deleted when
branch, ' Git branch ' will list all the local branchesgit checkout : GIT's checkout has two functions, one is to switch between different branch, such as ' git checkoutnew_branch ' will switch to New_branch branch, and another function is to restore the function of the code, such as ' Git CHECKOUTAPP/MODEL/USER.RB ' will update the user.rb file from the last su
named "test:
$ git push ssh://example.com/project.git test
For remote version libraries that frequently communicate, there is a quick command version:
$ git remote add example ssh://example.com/project.git
$ git push example test7. Maintenance of the version Library
Check for damage:
$ git fsck
Repackage and delete us
new_branch ' will force the deletion of the name named new _branch's branch, ' Git branch ' will list all the local branchesGit Checkout:git's checkout has two roles, one is to switch between different branch, for example, ' Git checkout new_branch ' will switch to New_branch branch, and another function is to restore the role of the Code, For example, ' Git che
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.