Re: Copying a file using gitlab ApI with commit history

2017-12-15 Thread Shikha Aggarwal
Thanks again Mike. Your message did make some things clear. perhaps, I should again reframe my question then. I don't want to get the git source on my local work space (so not use git clone). But I want to copy the file from one location to another using Git Lab API. Example in one of the links th

Re: Copying a file using gitlab ApI with commit history

2017-12-15 Thread Mike Weilgart
Thanks, Shikha.  I'm not sure I clearly expressed my point.  Git doesn't record anything about file renames, moves or copies.  The data you are looking to register with the GitLab API isn't possible to store in Git.As explained here: https://stackoverflow.com/a/1043566/5419599Git does not do rename

Re: Copying a file using gitlab ApI with commit history

2017-12-14 Thread Shikha Aggarwal
Thanks Mike for your response. Perhaps I didnot explain the question very well. 1. Yes I would like to do a copy not a move. 2. I would like to use the gitlab API to do that, https://docs.gitlab.com/ee/api/README.html The only API I found so far was https://docs.gitlab.com/ee/api/repository_fil

Re: Copying a file using gitlab ApI with commit history

2017-12-14 Thread Mike Weilgart
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