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] – ↷ Page moved from linux:command_collection:git to linux:command-collection:git 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 =====
Line 49: Line 55:
 **Differences:** **Differences:**
  
-{{:linux:command_collection:git_rebase_merge.png?600|}}+{{linux:command-collection:git_rebase_merge.png?600|}}
  
 //Sourced from: [[https://stackoverflow.com/questions/16666089/whats-the-difference-between-Git-merge-and-git-rebase|stackoverflow.com - git merge & git rebase]]// //Sourced from: [[https://stackoverflow.com/questions/16666089/whats-the-difference-between-Git-merge-and-git-rebase|stackoverflow.com - git merge & git rebase]]//
  • linux/command-collection/git.1690711889.txt.gz
  • Last modified: 2023/07/30 12:11
  • by Zyzonix