User Tools

Site Tools


git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
git [2023/02/07 16:18]
dblume Document blobless clone
git [2023/03/21 09:54] (current)
dblume
Line 68: Line 68:
   $ git push --set-upstream origin new_branch   $ git push --set-upstream origin new_branch
  
 +==== Creating a local branch from an existing remote ====
 +
 +After doing a fetch, and suppose "origin/remote-branch" exists, then just:
 +
 +  $ git switch remote-branch
 ==== Changing a local branch to a new remote branch ==== ==== Changing a local branch to a new remote branch ====
  
Line 136: Line 141:
 <code bash> <code bash>
 git pull --rebase  # --dry-run to test first git pull --rebase  # --dry-run to test first
 +</code>
 +
 +====== Applying changes in a stash to a changed file =====
 +
 +When ''git stash apply'' doesn't work: Show the stash changes and pipe that to patch. Now you have a patch you can apply.
 +
 +<code>
 +git stash show -p | patch -p0
 </code> </code>
  
git.1675815535.txt.gz · Last modified: 2023/02/07 16:18 by dblume