Skip to content

Instantly share code, notes, and snippets.

View rostand2017's full-sized avatar

Fotso Rostand rostand2017

  • Douala, Cameroun
View GitHub Profile
class ListNode:
def __init__(self, val=0, nextt=None):
self.val = val
self.nextt = nextt
def size(self):
i = 1
nextt = self.nextt
while nextt != None:
nextt = nextt.nextt
i += 1
@cmatskas
cmatskas / GitDeleteCommands.ps1
Last active September 22, 2022 07:59
Git Delete Branch commands
## Delete a remote branch
$ git push origin --delete <branch> # Git version 1.7.0 or newer
$ git push origin :<branch> # Git versions older than 1.7.0
## Delete a local branch
$ git branch --delete <branch>
$ git branch -d <branch> # Shorter version
$ git branch -D <branch> # Force delete un-merged branches
## Delete a local remote-tracking branch