Often I would move files locally say from one folder to another. When committing to Git, I have to manually remove the files on the server that do not match a file path existing on my local repository.
How could I make this a less painful task?
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.
git commit -awill automatically stage all modified and deleted files, so that your commit will reflect those changes. It doesn’t automatically add new files, though, which you will still need to do by hand.You can also look at
git mvandgit rmto do things a little more smoothly – in the sense that they will act on the checkout and stage the results, so you only have one command to issue.