I have a repository A, and a clone of it, named B. Then, I have edited a file in the A and not commit it. My question is if I can run git pull in B to get the edition in the A?
I have a repository A , and a clone of it, named B .
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can only pull revisions, i.e. commits. If an edit isn’t committed, it isn’t in the repository and can’t be pulled. However, you could do something like
git reset --hard HEAD^to undo the latest commit and erase the edit.If you want to keep the edit in repository A but not the commit, omit the
--hardoption toreset.