mirror of
https://github.com/danielepintore/dotfiles.git
synced 2026-06-15 20:25:13 +02:00
Added instructions for merging
This commit is contained in:
@@ -47,7 +47,22 @@ config commit -m "Add bashrc"
|
||||
config push
|
||||
```
|
||||
|
||||
## Performing a rebase after changes in the main repo
|
||||
## Merge or Rebase?
|
||||
|
||||
If you have more than one pc and you want to store their dotfile you can have a main repo for the common configs and then a machine specific repo. When you make some changes in the main repo you have to do a merge or a rebase to main.
|
||||
I suggest you to do a merge because is a not destructive opertion, but there is a disadvantage: you'll have a extra commit (the merge one). If you prefer to do a rebase you instead won't get a merge commit but you have to do a full rewrite of the commits, this can cause some problem if you like to change your machine config from another pc and then do a git pull because after you do a rebase the history is totally different, so you have do another git clone or something else to pull that changes (rebase).
|
||||
|
||||
### Performing a merge after changes in the main repo
|
||||
|
||||
After you've made some changes in the main repo the machine specific repositories need to be merged with main:
|
||||
```bash
|
||||
config checkout machine-repo
|
||||
config merge main
|
||||
config push origin machine-repo
|
||||
```
|
||||
Now you have merged the changes. (In the process you may have to resolve conflicts)
|
||||
|
||||
### Performing a rebase after changes in the main repo
|
||||
|
||||
After you've made some changes in the main repo the machine specific repositories need to be rebased on top of main:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user