View previous topic :: View next topic |
Author |
Message |
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5929
|
Posted: Fri May 22, 2020 7:01 am Post subject: anyone tried to move files from one repo to another in git? |
|
|
Greetings,
I wonder if someone has moved a file for one git repo completely to another git repo and lived to tell about it?
Thanks,
Dagg. _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6065 Location: Removed by Neddy
|
Posted: Fri May 22, 2020 7:29 am Post subject: |
|
|
Yes. Use cp.
Copy the file to the new repo. Git add, commit, push
In the original use git rm to purge it. Git add, commit,push _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5929
|
Posted: Fri May 22, 2020 9:38 am Post subject: |
|
|
Naib wrote: | Yes. Use cp.
Copy the file to the new repo. Git add, commit, push
In the original use git rm to purge it. Git add, commit,push |
that is not completely, the history is still in repo A there is no history in repo B _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6065 Location: Removed by Neddy
|
Posted: Fri May 22, 2020 9:43 am Post subject: |
|
|
oooh you want the history of the data rather than just the data (not what you asked ). Ok thats messy... thats grafting one repo on to another via rebase...
https://git.wiki.kernel.org/index.php/GraftPoint
make a graft of the file in questions history and apply to the new repo _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5929
|
Posted: Fri May 22, 2020 10:13 am Post subject: |
|
|
Naib wrote: | oooh you want the history of the data rather than just the data (not what you asked ). Ok thats messy... thats grafting one repo on to another via rebase...
https://git.wiki.kernel.org/index.php/GraftPoint
make a graft of the file in questions history and apply to the new repo |
hence the completely...
how much per file? _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
|