Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
anyone tried to move files from one repo to another in git?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5929

PostPosted: Fri May 22, 2020 7:01 am    Post subject: anyone tried to move files from one repo to another in git? Reply with quote

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
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6065
Location: Removed by Neddy

PostPosted: Fri May 22, 2020 7:29 am    Post subject: Reply with quote

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
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5929

PostPosted: Fri May 22, 2020 9:38 am    Post subject: Reply with quote

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
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6065
Location: Removed by Neddy

PostPosted: Fri May 22, 2020 9:43 am    Post subject: Reply with quote

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
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5929

PostPosted: Fri May 22, 2020 10:13 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum