#local branch
Explore tagged Tumblr posts
Text
How To Delete Local And Remote Branches In Git: A Complete Guide
Deleting a Local Branch in Git To delete a local branch, use one of these commands: Deleting a Remote Branch in Git To delete a branch from a remote repository (like GitHub or GitLab):
Local Branch vs. Remote Branch in Git
Understanding the difference between local and remote branches is crucial for working with Git effectively.
Local Branch
Location: Exists only on your machine.
Purpose: For individual development; changes here won’t affect other developers. It’s where you do your day-to-day development and changes.
You can create, delete, and modify it without affecting other developers.
Command to List Local Branches: git branch
Remote Branch
Location: Exists on a remote server (e.g., GitHub, GitLab).
Purpose: For collaboration; changes here are accessible to the team, allowing multiple people to work on the same branch.
You need to fetch or pull changes from the remote to sync it with your local branch.
Command to List Remote Branches: git branch -r
Key Differences Between Local and Remote Branches
Feature
Local Branch
Remote Branch
Location
Exists on your machine only
Exists on a remote server
Collaboration
Used for individual work
Used for collaboration with the team
Creation/Deletion
Only affects your local repository
Affects everyone who accesses the remote
Syncing
You can work offline
Requires fetching or pulling updates
Understanding with an example
Let’s walk through a practical example.
Step 1: Cloning the Repository
Let us clone a basic repo from GitHub git clone [email protected]:TvisharajiK/sample.git #git shows the below Cloning into 'sample'... remote: Enumerating objects: 3, done. remote: Counting objects: 100% (3/3), done. remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0) Receiving objects: 100% (3/3), done.
Navigate to the cloned directory and check the available branches:cd sample git branch -a * main remotes/origin/HEAD -> origin/main remotes/origin/main
Currently, we have only the main branch in the sample repository.
Step 2: Working with Local Branches
Let's create a local branch named try$ git checkout -b try Switched to a new branch 'try'
Deleting the Feature Branch
Now, try to delete the try branch using the -d option:$ git branch -d try error: Cannot delete branch 'try' checked out at '/Users/tvisharaji/sample'
You’ll encounter an error since you cannot delete the currently checked-out branch.
Switching to the Main Branch
Switch to the main branch to delete try:$ git checkout main Switched to branch 'main'
Now, delete the try branch again:$ git branch -d try Deleted branch feature (was 3aac499)
Deleting a Local Branch With the -D Option
Let’s recreate the try branch and make some changes:$ git checkout -b try $ echo "trying this" >> README.md $ git add README.md $ git commit -m 'Add to README'
Attempting to delete the branch with -d again, it will show an error because it contains unmerged changes:$ git branch -d try error: The branch 'try' is not fully merged.
Force Deletion
To force delete the branch, use:$ git branch -D try Deleted branch try (was 4a87db9)
Understanding Local Branch Deletion
It’s important to note that using -d or -D will only remove the local branch; any corresponding remote branch will remain unaffected.
Deleting a Remote Branch
To delete a remote branch, use one of the following commands:
For Git versions 1.7.0 and later:git push origin --delete <branchName>
Creating and Pushing a Remote Branch
Let’s create a tryrem branch, make some changes, and push it to the remote repository:$ git checkout -b tryrem $ echo "trying for the Remote branch" > remote.txt $ git add remote.txt $ git commit -m 'Add remote.txt' $ git push origin tryrem
Deleting the Remote Branch
To remove the remote tryrem branch:$ git push origin --delete tryrem
After executing this command, the remote branch is deleted, but your local branch will still exist.
Conclusion
In this article, we explored how to delete local and remote branches in Git. Here’s a quick summary:
Delete a local branch: git branch -d <branchName> or git branch -D <branchName> for force deletion.
Delete a remote branch: git push origin --delete <branchName>
FAQ
What command do I use to delete a local branch in Git?
To delete a local branch safely, use:bashCopy codegit branch -d <branchName>To force delete a local branch, use:bashCopy codegit branch -D <branchName>
How do I delete a remote branch in Git?
To delete a remote branch, use one of the following commands:bashCopy codegit push origin --delete <branchName>orbashCopy codegit push origin :<branchName>
What is the difference between a local branch and a remote branch?
Local Branch: Exists on your machine only; used for individual development without affecting others. Commands to manage local branches include git branch to list them.
Remote Branch: Exists on a remote server (e.g., GitHub or GitLab); used for collaboration. Changes to remote branches affect all collaborators. Use git branch -r to list remote branches.
Can I delete a branch that I’m currently on?
No, you cannot delete the branch you are currently checked out on. You must switch to another branch (e.g., main) before deleting the desired branch.
What happens if I try to delete a branch that has unmerged changes?
If you attempt to delete a local branch with unmerged changes using the -d option, you will receive an error. To forcefully delete the branch, you can use the -D option.
What are the consequences of deleting a local branch?
Deleting a local branch with -d or -D only affects your local repository. The corresponding remote branch will remain intact unless explicitly deleted.
How can I verify if a branch has been deleted successfully?
To check if a branch has been deleted:
For local branches, use:bashCopy codegit branch
For remote branches, use:bashCopy codegit branch -r
What is the process for creating and pushing a new branch to a remote repository?
To create and push a new branch to a remote repository:bashCopy codegit checkout -b <newBranchName> git push origin <newBranchName>
0 notes
Text
In the middle of exams so here are just some higher quality versions of my last sketches!
(There will be no context for Menelaus dressed as a seal and Helen doing drugs. If you know, you know.)
#the odyssey 1997#the odyssey#Telemachus#Penelope#Odysseus#Nausicaa#Menelaus#Helen#Peisistratus#he's here too but I think I forgot to tag him last time...#Athena#yes her spear has an olive tree branch handle and her armor is fashioned to look like feathers#(side note I have silver and bronze armor designs for her too but I love how the gold looks here)#(look forward to a more detailed artwork of her (in a certain Odyssey scene) in the future!)#anyway I recently got my hands on a physical copy of emily wilson's translation of the odyssey!#it was the last copy at my local book store and my library doesn't have a copy#it was a miracle that I managed to get the iliad since apparently a professor at my uni keeps forgetting to return the copy#(on the flip side its fun to see what he annotated and I'm thinking I might take his course once it's empty enough)#anyway I'll have to wait on (re)reading the odyssey#because 1) i gotta focus on exams#2) I want to finish the iliad before the return date (im on book 17 and everyone is such a vibe)#3) I have so many wips I want to finish too
936 notes
·
View notes
Text
I want this guy to start enacting french rural courtship tradition. Like putting a whole tree by someone's window in the night.
The tradition is mostly known as "l'arbre de mai" [may tree] but the trees can also just be called "Mais". You may know the german "Maibaum", but it's also a tradition in France, with variants depending on where you live. Basically, in the night of the first of may, young men will bring decorated trees (usually birch in germany and beech in france, but some trees can have additional meaning) to the window of unmarried girls from their village. This is done anonymously and the girls can try to figure out who did that. It's also linked to marriage.
In some region, instead of a small tree, all the young men bring a large tree to the village center and use the branches to make bouquet to leave on the window sill of girls.
There are many variants.
#one piece#one piece fanart#red leg zeff#black leg sanji#sanji#zeff#monkey d. luffy#roronoa zoro#french sanji#zosan#sanzo#i have seen posts about Zoro being japanese subtle in his flirting#and i wanted Sanji to be french flirting back with something equally subtle. or not so subtle. its a whole tree.#so behold. rural and probably very local tradition. tried my best to research and was surprised its more widespread than i thought#read an article saying that leaving appletree branches means you think your target is a drunkard. interesting.#LBArt#fanart
351 notes
·
View notes
Text

welcome to big brotherhood branch!
#dreamworks trolls#branch trolls#keith trolls#that moment when local weird kid adopts former hermit#doodle#sketch#fanart#my art#chibi#cute#trolls
64 notes
·
View notes
Note
If one were to print out a large amount of fanfics, how well-fortified would the resulting slash pile be after the introduction of a family of woodchucks?
While I appreciate the pun, the answer is not very because the thing that makes paper take ink so well is also the thing that makes it not very structurally stable .
#for those of you not native to the rockies:#Slash is also a term for dead plant matter usually left over from land management#a Slash Pile is a pile of dead branches/logs/raked up leaves/lawn clippings/weeds you pulled up etc.#good basis for an open compost pile or filling in a raised bed#you can also add newspaper and cardboard#and probably a little slash fic for spice.#also a great habitat for your local microfauna#everything from bugs to toads to snakes to woodchucks
121 notes
·
View notes
Text
gay-lesbian hostility -> gay-lesbian solidarity
68 notes
·
View notes
Text


i’ve been making collage buttons!
#working this small makes me want to kms#but i love how they come out#mostly have been making them for a local band but im branching out#my art#collage
17 notes
·
View notes
Text
anyway the squirrels continue to have tree sex that defies the laws of physics
#it's like they've been able to develop localized rotational gravity and can just orbit each other#with the loosest of abstract connections to the idea of tree branches
13 notes
·
View notes
Note
Please may we have some regency recs from the local lyres book club? 🥺
ohh you mean regency romance? i'm not super In The Game as it is, but i can absolutely tell you my favourite one and the one i've most recently finished!
i think everyone who feels the feelings expressed in this post should read a seditious affair. everyone. it's well-researched and class-aware and well-executed. silas is an excellent character. if you're into 1810s radical politics, this book is for you; alternatively, if you could take or leave 1810s radical politics but enjoy a slow burn during which the characters are hooking up literally the entire time, it is also for you. (a gentleman's position from the same series is very good, too.)
a couple of days ago i finished letters to half moon street, a regency romance with a fantasy bend, and it was very sweet. i like when self-esteem issues are at the core of a plot's conflict, and this really hit every branch on the way down the Issues tree. its tone is warm and its protagonist is a fairly loveable wet cat of a man. recommend, even if i do think it could have fleshed out its love interest a bit better.
honourable mention: miss percy's pocket guide for the care and feeding of british dragons, which is not a romance and which i am of many minds about, but it still deserves a shoutout for having a dragon hatchling in its quaint and sensible little world.
hopefully there's something in here that sounds good to you, anon!
#fun fact about a seditious affair is that it was the reason i could seem smart and well read abt the cato street conspiracy in my MA#even though i hadn't done any reading on spenceans before. this book catapulted me straight down the rabbit hole#(and now five years later i'm publishing on spenceanism myself! <3)#but like that branch of radicalism by the late 1810s is a fringe topic ms charles knew what she was about. she Really did the research#asks#anon#local lyres book club
20 notes
·
View notes
Text
uh oh❣️
#dreamworks trolls#trolls#broppy#branch trolls#poppy trolls#branch x poppy#before the 1st movie#when the local grump is actually kinda cute#she's totally thought about it before#he literally was hatched in a boyband ofc he's pretty#doodle#fanart#my art#chibi#cute#tumblr artist#artist on tumblr#save me broppy
427 notes
·
View notes
Note
Hello. I just learned about this thing a bit ago, and got my library card today, and I was wondering if you knew of any other similar libraries that operate primarily through Libby? Now that I have had my eyes open to the possibility of multiple library cards my brain just wants to collect all that I can get.
hi! hmm which are primarily digital libraries through Libby… honestly, no. That’s one of the reasons we decided we’d be able to move forward with QLL after we had the idea, as it was filling a gap that no one else was.
Of course there are some public libraries (brooklyn among others) that have opened up *part* of their Libby catalogues nationally for certain age ranges (13-26), and then there are other digital branches of physical libraries like the Library of Congress’ open access digital collections. The closest I can think of for a fully digital library would be the Digital Public Library of America or DPLA, but they don’t use Libby. BPL, LoC, DPLA and others also don’t have the same focus on queer books that we do at QLL.
There are other excellent queer libraries out there too, but most are primarily physical collections (one exception being Quatrefoil Library who also launched a digital branch on Libby, but they also have a much more geographically narrow focus - Minneapolis - than we do)
#asks#libby#I’d google ‘free non-resident library card’ or something along that line as well#we’ve also reblogged a few posts that list some of these out#but by and large they’re local public libraries that also have digital branches not just digital libraries#still#you should be able to find a few out there!
54 notes
·
View notes
Text
2024
REFUSE SELF-OPTIMIZATION
REMEMBER TO CARRY CASH TO GIVE TO PEOPLE WHO NEED IT
HOST A REGULAR DINNER PARTY
MORE HYPERLOCAL ACTIVISM
DROP POINTLESS COMMITMENTS
TEXT YOUR SIBLINGS MORE STUPID LITTLE STORIES ABT YOUR DAY
#this one’s for me but you can share it if you also want to join your local REDACTED branch and send your brothers memes more often#personal#edited this post and sticking it on my forehead like a sticky note (I took on an additional pointless commitment instead of dropping any)
119 notes
·
View notes
Text

"Antlers. Antlers everywhere. Out the eyes, the shoulder blades, the hind. The thing doesn't move normally. It turns its head in jolted motion, and it creaks like wood in dound that makes my skin crawl. It has no eyes, but it definitely saw me. I didn't stick around. That thing can only be from Soulgrove." ~ Alfred Anker
#speedpaint#art#artwork#my art#my story#artists on tumblr#deer with branches coming out its face because of a series of horrific arcane experiments that now realm the forest scaring locals#strange creatures#storytelling#storytelling with quotes#experimental#experimental storytelling#strangedeer#deer#forest#spooky#creepycore#trippy#cryptid#tales from charmos#worldbuilding#creative writing#writing#fantasy#fantasy writing#is this too niche#illustrator#illustrative art#branches#deer with branches coming put its face created by a series of horrific arcane experiments by an organisation known as soulgrove
14 notes
·
View notes
Text
[ Branchtail | ThunderClan | Deputy ]
Branchtail is a longhaired chocolate color point mitted tomcat with blue eyes.
BIOGRAPHY
Basics
Previous names: Gender & pronouns: Sexuality: Age:
Self
Personality: Beliefs: Motivations:
Background
Family: Friends: History:
Miscellanious
Favorite food: Trivia:
#warrior cats#warriors#character post#thunderclan#deputy#branchtail#some fun facts about this guy#hes a purebred ragdoll and was supposed to either be a show cat and/or a stud#registry would've named him like#Fulfilling Doll's Love Letter#his breeder's kid left the front door open on accident and young branch just stepped outside and got lost#tried to go home and failed. he got picked on by local strays#his breeder tried to find him and never did because he ended up in thunderclan!
10 notes
·
View notes
Text
of course i have an accent everybody has an accent and mine is quote-unquote undetectable in most situations because it is bland east coast educated upper middle class white accent but what is much more interesting to me is how my SPEECH patterns are intensely jewish philadelphia. like there's so much leftover germanic stuff in there in my sentence constructions which we never had to get rid of during the long 20th century project of assimilation because of the pa dutch presence and so on which i simply did not realize until i spent significant time around new york jews. now every time i'm like wait why don't you phrase anything like i do
#classic example is 'i'm done my homework' vs 'i finished it.' but there are so many more to do with syntactical structure#last year i was reading a mid 20C anthropology work of pa german medical folklore and they extensively quoted their sources and like. whoa.#that's just how everyone in (white) SE PA speaks but i simply did not realize it was so localized/so traceable to our history#and it's kinda cool that even though only one branch of my family is german jewish the rest of my yiddish-speaking ancestors fit right in#philly best city in the world mayhaps???#rare pic of me in the wild
9 notes
·
View notes
Text

got out some physical library books for the first time in......an embarrassingly long time
#both books that I'm not sure will be my vibe but they have ace & aro MCs respectively so lets see#in my defense they shut down the local library branch :( and i dont have any other reason to go slightly further into town.#(and i prefer audiobooks and ebooks)#laya talks
9 notes
·
View notes