Copy or move?

If you mean move, then what you want is probably "git log --follow filename" 
after you move it.  But GitLab does that in the history viewer already.

As for preserving the commit history of a single file, I suggest you dig in 
deep to how Git really works, because GitLab is built on top of Git and won't 
do anything that's fundamentally impossible in Git.  Unfortunately, your 
question doesn't really make sense compared to Git's architecture, where commit 
objects and ALL of Git's objects are immutable.  And they aren't versions per 
file; they are versions for your entire project.  So unlike some other VCSes, 
you can't just transfer the history of one file to become the new history of 
another file and leave the rest of your project's history unaffected.

Does that answer your question?

Best,
—Mike Weilgart
Vertical Sysadmin, Inc.

--
Need training on Git, Bash, Vim or GitLab?  Email train...@verticalsysadmin.com.

On Dec 14, 2017, at 2:58 AM, Shikha Aggarwal <shikha.aggarwal0...@gmail.com> 
wrote:

Hello,

I need to copy a file in from one location to another but I want to preserve 
the commit history of that file.
Is it possible to do that using GitLAB API?

Thanks
Shikha

-- 
You received this message because you are subscribed to the Google Groups 
"GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to gitlabhq+unsubscr...@googlegroups.com 
<mailto:gitlabhq+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/gitlabhq/4c51709f-adcc-4f87-99e1-319be0f32fac%40googlegroups.com
 
<https://groups.google.com/d/msgid/gitlabhq/4c51709f-adcc-4f87-99e1-319be0f32fac%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout 
<https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to gitlabhq+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/gitlabhq/0C457FD5-7F58-42D9-91A1-10DD71B1E1D7%40verticalsysadmin.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to