Jay J
Jay J

Reputation: 430

Delete a file from a branch and commit it back to the master in Github/Git?

The scenario is this - on a branch, code from a few files has been combined into a single file. The original files are no longer needed and deleted from the branch. Will the same happen to the master when merging the committed branch back in?

Thanks in advance!

Upvotes: 1

Views: 48

Answers (1)

mechanicals
mechanicals

Reputation: 685

If you have deleted the files locally and will push that local branch to the remote branch, then YES. The files at remote origin will also get deleted.

Also, you'll need to commit the deleted files locally and only then push.

Let me know if this is what you are intending to do.

Upvotes: 1

Related Questions