[MacPorts] WorkingWithGit modified

MacPorts Wiki noreply at macports.org
Wed May 22 21:16:43 UTC 2019


Page "WorkingWithGit" was changed by cjones051073
Diff URL: <https://trac.macports.org/wiki/WorkingWithGit?action=diff&version=85>
Revision 85
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: WorkingWithGit
=========================================================================
--- WorkingWithGit (version: 84)
+++ WorkingWithGit (version: 85)
@@ -117,7 +117,7 @@
 git pull --rebase
 }}}
 
-'''Note:''' `git rebase` requires that you do not have uncommitted modifications in your working copy. If you have modifications, you can temporarily save them using `git stash` and restore them after the rebase using `git stash pop`.
+'''Note:''' `git rebase` requires that you do not have uncommitted modifications in your working copy. If you have modifications, you can temporarily save them using `git stash` and restore them after the rebase using `git stash pop`. Alternatively, if you are using git version 2.6 or newer you can use the `--autostash` option with `git pull --rebase`. With this, you would run `git pull --rebase --autostash` and this as its name suggests automatically does the `git stash` prior to the rebase, and `git stash apply` afterwards. Note that the MacPorts `git` port provides an up to date version that supports this.
 
 '''Warning:''' `git pull` without the `--rebase` flag is a shorthand for `git fetch && git merge origin/master`, which will automatically create a merge commit if it thinks that's necessary.
 
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/WorkingWithGit>
MacPorts <https://www.macports.org/>
Ports system for macOS

This is an automated message. Someone added your email address to be
notified of changes on 'WorkingWithGit' page.
If it was not you, please report to admin at macports.org.


More information about the macports-changes mailing list