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
linux:command-collection:git [2023/07/30 12:11] – ↷ Links adapted because of a move operation Zyzonixlinux:command-collection:git [2025/06/01 18:35] (current) – [Pushing changes to GitHub] Zyzonix
Line 30: Line 30:
  
 Before starting to edit, sync external changes*****: Before starting to edit, sync external changes*****:
 +<code bash>git fetch <remote-repo></code>
 <code bash>git pull origin <branch></code> <code bash>git pull origin <branch></code>
  
Line 39: Line 40:
  
 *****Replace ''branch'' with the concerning branch, e.g. ''main''. *****Replace ''branch'' with the concerning branch, e.g. ''main''.
 +
 +Reset to previous commit:
 +<code bash>git reset --hard <commit></code>
 +To then push changes/reset:
 +<code bash>git push --force</code>
  
 ==== git merge and git rebase ===== ==== git merge and git rebase =====
  • linux/command-collection/git.1690711891.txt.gz
  • Last modified: 2023/07/30 12:11
  • by Zyzonix