Reputation: 73
I have pulled a branch from Bitbucket to my local. It contains multiple folders and I deleted one of the folder and commited my changes. Now, if I do a git pull, then shouldn't the deleted folder appear in my local machine again? Its not happening. Any ideas why this might be the case?
Upvotes: 0
Views: 296
Reputation: 16660
It won't happen because your HEAD
will be pointing to your local commit. If you want those files, then revert(reset) your local commit and then do a git pull:
git log
<Hash id 1>
git reset <Hash id 1>
git pull
Upvotes: 1
Reputation: 72795
It will not. The remote (on bitbucket) is at commit n
and your own repository is at n+1
(your new commit deleting the file). If you pull, git will tell you that your branch is ahead and that there's nothing new to pull.
Upvotes: 1