How do I merge a old changes into a Git repo?

Viewed 44

I know this is a common question, but I can't find the answer I'm looking for.

I have a GitHub repository that receive a few bug fixes that I merged into master.

But I have 100s of change in a local folder, and I want to merge the changes with the master.

What I am confused about is where do I start:
Do I create a branch, then drop my new files into that branch folder on my hard drive, commit the changes to this branch, then merge the branches?

1 Answers

If you are the owner of the GitHub repository and have its latest master already cloned, you could simply:

  • copy over those changes in your local cloned repository folder
  • git add/commit and push (no merge needed, since you are the owner)

Not that there is no "branch folder": the folder would be the same as your local cloned repository folder.
You can, if you want, make a branch for those changes, in order at least to add/commit those 100s of changes in smaller commits, helping to build a coherent history (instead of one commit, with as commmit message "giant dump of change").
But that would be in the same folder as your currently cloned repository.

Related