User Tools

Site Tools


gitcommands

Differences

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

Link to this comparison view

Next revision
Previous revision
gitcommands [2026/02/24 18:30] – created tim45tenwagitcommands [2026/02/24 18:33] (current) tim45tenwa
Line 1: Line 1:
 ==== Useful git commands ==== ==== Useful git commands ====
 +
 +Add Codeberg as a new remote:
 +
 +<code>
 +git remote add codeberg https://codeberg.org/username/new-repo.git
 +</code>
  
 Isolate the folder into a temporary branch: Isolate the folder into a temporary branch:
  
 +<code>
 git subtree split --prefix=your-subdirectory-name -b split-branch git subtree split --prefix=your-subdirectory-name -b split-branch
 +</code>
  
 Push that specific branch to Codeberg's main branch: Push that specific branch to Codeberg's main branch:
  
 +<code>
 git push codeberg split-branch:main git push codeberg split-branch:main
 +</code>
gitcommands.1771957842.txt.gz · Last modified: by tim45tenwa