Reputation: 163
I've just finished a function, add it and commit it in develop branch. When time came to add my work to server, I logged in with ssh, and i did : git pull origin "wrong branch". my web site took an old update, now i've re-pull with develop (which the correct branch) and nothing changes.
How can i fix it please ?
Here is the response I get :
From 193.108.29.147:/var/git/repositories/my_website
* branch develop -> FETCH_HEAD
Already up-to-date.
Upvotes: 0
Views: 297
Reputation: 27357
The wrong branch must be ahead of the correct branch. This means that pulling the wrong branch also pulled the correct branch. You probably want to get rid of those extra commits.
Type git log
and find the commit you've made for your function. Then run git reset --hard [sha of your commit]
(make sure you don't have any uncommited changes!). Then run git pull [correct branch]
.
Done
Upvotes: 1