bitbucket - Git deleted my files. Can they be recovered? -


i created git repository on bitbucket keep track of scripts. have limited experience git. use combination of linux , windows have been adding files repository using git bash shell on windows has drive mapped linux share.

i have been adding files on last few days, on 1 of commits entered wrong comment. wanted fix , googled solution. suggestion found use rebase. tried wasn't successful decided live wrong comment.

after created 2 more scripts wanted add repository 'git add'.

when tried commit these got message "you editing commit while rebasing branch 'master' on '3ac74cb'". after message list of files , line suggestions do. unfortunately has moved out of terminal buffer can't track message were, followed messages.

one of messages suggested pull - due fact made changes text file edited in bitbucket. did pull.

i have done pull, commit again , push. none of these seem have worked did more googling rid of rebase message. based on answer found did 'git rebase -abort'.

after this, 2 scripts trying add disappeared.

can files somewhere or deleted? how can avoid happening again because can't afford lose work this. whole point of using git not lose work.

if need further information try , make sense of mess please ask. appreciate help.

it sounds in middle of rebase operation when created new files in working directory. unfortunately using git rebase --abort reset head when rebase operation started. if git status doesn't show untracked files i'm afraid files may have been lost.

git rebase useful command when used correctly can cause lot of trouble when misused.

for future reference, can change commit message recent commit using git commit -m <message> --amend. should prevent running in trouble same reason in future.

i hope helps.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -