Posts

Showing posts with the label github

How can I delete all Git branches which have been merged?

How can I delete all Git branches which have been merged? I have many Git branches. How do I delete branches which have already been merged? Is there an easy way to delete them all instead of deleting them one by one? git branch -D deletes branches that have NOT been merged! Use with care! – Dan Solovay Dec 23 '16 at 14:05 To be slightly more specific git branch -D deletes any branch whether it as been merged or not. – PhilT Feb 8 '17 at 9:48 git branch -D You can also do this directly from GitHub, if you go to the 'branches' section of your repo (e.g. github.com/<username>/<repo_name>/branches). There should be a list of all your branche...

git fetch upstream master not working, what is going wrong?

Image
git fetch upstream master not working, what is going wrong? So I'm wondering if there is a problem with the upstream master? I'm not sure if this error happens when everything is updated already or if it's something different. I have added upstream link with no problem, using $ git remote add upstream https://github.com/udacity/course-collboration-travel-plans.git just want to sync with the master now git remote add <name> <url> does not probe to see if there is a server at <url> that can access a Git repository. Are you sure your <url> is correct? (Hint: what happens if you click on the URL in your question?) – torek Jul 1 at 3:27 git remote add <name> <url> <url> <url> 1 Answer 1 ...

Github desktop revert commit results in >>> HEAD even in a new cloned repository

Image
Github desktop revert commit results in >>> HEAD even in a new cloned repository I try to revert a commit on Github Desktop. There was conflicts so I deleted the whole project and cloned it again to have a completely fresh clone. Still after I reverted the commit I get things like ">>> HEAD". Why can't it just go back to previous commit? I've made an animated gif of what I do: 2 Answers 2 You are reverting—i.e., asking Git to undo —the changes from a commit that is not the most recent commit. If you intend to revert to that commit, i.e., to undo the changes that came after that commit, you should revert the subsequent commit. See also How to revert Git repository to a previous commit? You seem to be misunderstanding GIT, Still after I reverted the commit I get things like ">>> HEAD". Why can't it just go back to previous commit? What you m...