1

Today I was working with my partner on a small project and saved regularly to github using my username and password (https://github.com/mikestepanov/W2D3). Unfortunately we forgot to change global username and because of that our work was credited to the different account.

Since I am the creator/host of the repository, can I somehow credit commits to one of us for that specific repository?

1 Answers1

1

You will need to edit past commits (this is called rebasing) on your local (stored on your computer) git repository, then force-push it to GitHub with a git push --force to overwrite the commits on your remote repository.

As for the editing part, you may be interested in filter-branch. This SO answer gives a nice example that is related to what you aim to do.

ifconfig
  • 6,242
  • 7
  • 41
  • 65
JoshuaRLi
  • 1,665
  • 14
  • 23