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 revisionPrevious revision
Next revision
Previous revision
git [2026/05/02 12:48] – Git subtree and submodule reddygit [2026/05/02 20:13] (current) reddy
Line 1: Line 1:
 +
 +==== Git Remote Server ====
 +
 Setting up a git server is as easy as this... Setting up a git server is as easy as this...
  
Line 23: Line 26:
 </code> </code>
  
 +==== Merge between branches ====
  
 <code> <code>
Line 46: Line 50:
 A sub module creates a link to another Git repository. A sub module creates a link to another Git repository.
  
 +<code>
 # Allow the use of file paths # Allow the use of file paths
 git config --global protocol.file.allow always git config --global protocol.file.allow always
Line 56: Line 61:
  
 # When someone wants to clone the parent repo # When someone wants to clone the parent repo
-git clone --recurse-submodules /Volumes/path/to/repository+git -c protocol.file.allow=always clone --recurse-submodules /Volumes/path/to/repository 
 +</code>
  
 ==== Sub Tree ==== ==== Sub Tree ====
Line 62: Line 68:
 A subtree is essentially a copy. The parent repository does not have any reference to the path of the child repository (therefore all the "git subtree" commands require the path to the child repository). A subtree is essentially a copy. The parent repository does not have any reference to the path of the child repository (therefore all the "git subtree" commands require the path to the child repository).
  
 +<code>
 # Add/Push/Pull # Add/Push/Pull
 git subtree add/pull/push --prefix child_1 /Users/nitin/Documents/practice/try_git_child_1 main git subtree add/pull/push --prefix child_1 /Users/nitin/Documents/practice/try_git_child_1 main
 +</code>
 +
 +==== Git Checkout Subdirectory ====
 +
 +<code>
 +git clone --no-checkout --depth=1 --filter=tree:0 https://github.com/pockettheories/somerepo.git
 +cd test-git-partial-clone-big-small-no-bigtree
 +git sparse-checkout set --no-cone /subdir1 /subdir2 /subdir3
 +git checkout
 +</code>
  
git.1777718882.txt.gz · Last modified: by reddy

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki