My current branch is "feature\COMS-260". In the remote there is one branch "hotfix/4.6.7". For some reason, my branch code is mess up.
I want to use all files in branch "hotfix/4.6.7" to overwrite my local branch "feature\COMS-260".
How to do it? I need Git commands or Sourcetree details.
Your description does not give all needed information - as Seth asked, it's crucial whether some of your erroneous files from branch "feature\COMS-260" are already pushed to your remote repository and if someone else is tracking branch "feature\COMS-260" in this case.
Also the information is missing whether some commits on your branch "feature\COMS-260" should be preserved, or whether all commits on branch "feature\COMS-260" are a mess (and maybe deleted therefore).
I'll try to describe the solutions for the two thinkable situations (assuming some of your commits on branch "feature\COMS-260" should be preserved):
******* To be on the safe side, make a backup of your local repository in case of some failure ...*******
Case 1: erroneous files already pushed to branch "feature\COMS-260"
Case 2: erroneous files NOT already pushed to branch "feature\COMS-260"
That is one solution. If anyone else is tracking feature/COMS-260, they'll have some headaches.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, it has been to the remote. Nobody use it but me. I try to use the command "git reset --HARD commitId". commitid is for hotfix/4.6.7. Not sure if it is right.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Has feature/COMS-260 been pushed to any remotes? If so, do you know whether any other developers have used it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.