Sunday, November 26, 2017

How do I delete a Git branch both locally and remotely?








To delete Locally - (Normal),
 
git branch -d my_branch
 
If your branch in rebasing/merging progress and that was not done properly means, you will get an error Rebase/Merge in progress so in that case, you won't be able to delete your branch.

So either your need to solve rebasing/merging otherwise you can do force Delete by using,

git branch -D my_branch
 
To delete in Remote:

git push --delete origin my_branch
 
can do the same using ,

git push origin :my_branch   # easy to remember both will do the same.

16 comments:

  1. I was looking for this command lines. Thank you!

    ReplyDelete
  2. Australia Best Tutor is providing online Assignment Help Services for colleges and universities students. Here Students are getting best results and better grades.

    Discount Code : ABT30

    For More Information
    Online Assignment Help
    Assignment Help
    Instant Assignment Help
    My Assignment Help
    Help with Assignment
    Accounting Assignment Help

    ReplyDelete
  3. Best of the interview question on the php language. I think i got the php classes from you.

    ReplyDelete
  4. PHP is a booming sector in IT industry. Grandmaster online provides online training in PHP, Java, Python, Web designing and development all across India.

    ReplyDelete
  5. Thanks for sharing this information And...
    E-school Bareilly

    We provide Project and tutorial from E-school you can learn everything that will help you to Increase your coding knowledge.

    ReplyDelete
  6. it's a very great post. thanks for sharing with us. such a it's very useful for us.
    PHP training in Chandigarh

    ReplyDelete
  7. CIIT Noida provides Best MCA Courses in Noida based on the current IT industry standards that help students to get high paying jobs in Top MNCs. CIIT provides Best MCA Training in Noida, Greater Noida, and Ghaziabad. CIIT is one of the trusted MCA training institutes in Noida providing practical knowledge and 100% job assistance with basic as well as advanced level MCA subjects. CIITN is the best MCA college in Noida, greater noida, ghaziabad, delhi, gurgaon regoin.

    At CIIT MCA classes in Noida is conducted by subject experts corporate professionals with 9+ years of experience in managing real-time and live projects. Sofracle Nano Specialized MCA classes Noida is the perfect blend of academic learning and practical sessions to provide maximum exposure to students that transform an average student into a corporate professional whom companies prefer to hire.

    Best MCA College in Noida

    ReplyDelete
  8. I am really happy to say it’s an interesting post to read. I learn new information from your article, you are doing a great job.
    php training in IndoreKeep Posting:)

    ReplyDelete
  9. Nice Information Thank You For Sharing Keep Sharing PHP Training In Chandigarh

    ReplyDelete
  10. pas ini untuk ngerjakan tugas kampus

    ReplyDelete
  11. thanks for sharing the information.
    Indian Cyber Army’s most awaited internship is live now. Summer Internship 2018 on “ Ethical hacking” and book your seats before it runs out.Candidates have to get themselves registered to be a part of this Internship program. Here internship will give you on-the-job experience, help you learn whether you and Cyber security industry are a good match and can provide you with valuable connections and references. Here interns are usually exposed to a wide variety of tasks and responsibilities which allows the intern to showcase their strengths by working on projects for various managers that work on different parts of Indian Cyber Army. Becoming a high performing intern is a fantastic way to improve your employment prospects. This internship can be a great way to get your foot in the door of success with a prestigious or desirable Organization.As career in ethical hacking is most in demand.

    ReplyDelete
  12. Thanks for sharing this kind of useful information xtensible offers best web programmers.
    For More Information. Click here

    ReplyDelete
  13. thanks for sharing the more valuable information.
    Indian Cyber Army credibility in Ethical hacking training & Cybercrime investigation training is acknowledged across nation as we offer hands on practical knowledge and full assistance with basic as well as advanced level ethical hacking & cybercrime investigation courses. The training is conducted by subject specialist corporate professionals with wide experience in managing real-time ethical hacking/ cyber security projects. Indian Cyber Army implements a blend of academic learning and practical sessions to give the candidate optimum exposure.Ethical hacking training ,
    Ethical hacking course

    ReplyDelete
  14. nice code bro article are awesome follow my blog for php www.gajabwap.blogspot.in

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...