xcode - Updating project changes in an old commit - git -
i have particular commit xcode project. need undo settings change, made in particular commit (not previous commit). how go this? can update project settings xcode project not using diff file. can tell me how approach issue?
you have 2 options. can either nuke previous commit, or can amend file has settings change , make new commit on top of branch.
option 1
git reset --hard head~1 git push origin your_branch --force
this roll entire branch previous commit, overwrite repository. have succeeded in undoing settings change, overwriting other changes, might want keep.
option 2
git checkout <sha-1> settings_file
where <sha-1>
sha-1 hash of most recent commit made branch. command overwrite settings file in local repo previous version want. can make new changes settings file, , when finished, can commit using:
git commit -m 'updated settings file' git push origin your_branch
option 2 adds new commit undo change made settings file, while option 1 erases changes ever having been made. you want go option 2 though.
Comments
Post a Comment