0xbadf00d
0xbadf00d

Reputation: 18218

"Export" a local branch in git for Visual Studio 2019

I'm sure it's a dumb question, but I've never used git before. I'm using the git extension for Visual Studio 2019, cloned a remote repository, created a new local branch and created/modified some files. I don't want to push my local changes to the remote server, but send my local changes to a research fellow. Is there a way to send him only the newly added/modified files?

Upvotes: 2

Views: 1097

Answers (1)

VonC
VonC

Reputation: 1326942

Depending on the type of connectivity which exists between your workstation and your research fellow, you could simply bundle your repo.

Bundle only your branch (especially is the repo is huge)

git bundle create ../abundle yourBranch

Or even with less commits (very small bundle, assuming yourBranch comes from master)

git bundle create ../aBundle master..yourBranch

That will give you one file, which is easy to copy around/send to your colleague.
Said colleague will be able to fetch from it, getting your branch in the process.

The other approach is to generate a patch from your branch (that would hide the history of all commits in that branch though)

Upvotes: 2

Related Questions