moimoi
moimoi

Reputation: 201

How to update git master from non tracked code

How to update git master from non tracked code

Given some code has come as tar.gz. This is updated code of master.
But the work was done outside of git.

Say I want to update this new code as my master.

How could this be done

Upvotes: 0

Views: 37

Answers (1)

eftshift0
eftshift0

Reputation: 30277

Find from which revision of the project the stuff in the tar.gz was started to be developed on its own.

git checkout starting-revision-id
git rm * # remove everything
tar zxvf the-file.tar.gz
git add .
git rm --cached the-file.tar.gz # just in case
git commit -m "Stuff done on the tar.gz" --author="Not me"
# if you want to set master over here:
git branch -f master
# if you want to push to a remote master branch:
git push some-remote HEAD:master

Upvotes: 2

Related Questions