Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vincent MAZENOD
git-test
Commits
92e6f25d
Commit
92e6f25d
authored
Jul 05, 2021
by
Vincent Mazenod
Browse files
hard working
parent
d91e0923
Changes
2
Hide whitespace changes
Inline
Side-by-side
doc.md
View file @
92e6f25d
https://www.atlassian.com/git/tutorials/git-subtree
## Adding the sub-project as a remote
Adding the subtree as a remote allows us to refer to it in shorter form:
```
git remote add -f git-subtree git@gitlab.isima.fr:vimazeno/git-subtree.git
```
Add the subtree by referring to the remote in short form:
```
git subtree add --prefix features/git-subtree git-subtree master --squash
```
Update git subtree anytime:
```
git fetch git-subtree master
git subtree pull --prefix features/git-subtree git-subtree master --squash
```
## Contributing back upstream
record a merge so that we can track the entire tree history of the plug-in up to this point:
```
git merge -s ours --no-commit git-subtree/main
```
Read the content of the latest tree-object into the plugin repository into our working directory ready to be committed:
```
git read-tree --prefix=features/git-subtree -u git-subtree/main
```
commit on subtree
```
git ci -m"[subtree] adding new feature"
```
update git-subtree repo git pull -s subtree tpope-vim-surround main
\ No newline at end of file
features/git-subtree/fetaure
View file @
92e6f25d
a really cool feature
\ No newline at end of file
a really cool feature
another one
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment