Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the delete branch on server slide #277

Open
theFeu opened this issue Jan 14, 2025 · 0 comments
Open

Replace the delete branch on server slide #277

theFeu opened this issue Jan 14, 2025 · 0 comments
Labels
day1 Topics on Day One needs-discussion Needs to be discussed

Comments

@theFeu
Copy link
Collaborator

theFeu commented Jan 14, 2025

We can delete the slide that explains deleting the branch via git push origin :branch-to-delete and replace it with git push origin --delete branch-to-delete
On git-scm I found this:


Deleting Remote Branches
Suppose you’re done with a remote branch — say you and your collaborators are finished with a feature and have merged it into your remote’s master branch (or whatever branch your stable codeline is in). You can delete a remote branch using the --delete option to git push. If you want to delete your serverfix branch from the server, you run the following:

$ git push origin --delete serverfix
To https://github.com/schacon/simplegit
 - [deleted]         serverfix

Basically all this does is to remove the pointer from the server. The Git server will generally keep the data there for a while until a garbage collection runs, so if it was accidentally deleted, it’s often easy to recover.


src: https://git-scm.com/book/en/v2/Git-Branching-Remote-Branches
(scroll all the way down)

@theFeu theFeu added day1 Topics on Day One needs-discussion Needs to be discussed labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
day1 Topics on Day One needs-discussion Needs to be discussed
Projects
None yet
Development

No branches or pull requests

1 participant