Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "branch"
-
When you stare into git, git stares back.
It's fucking infinite.
Me 2 years ago:
"uh was it git fetch or git pull?"
Me 1 year ago:
"Look, I printed these 5 git commands on a laptop sticker, this is all I need for my workflow! branch, pull, commit, merge, push! Git is easy!"
Me now:
"Hold my beer, I'll just do git format-patch -k --stdout HEAD..feature -- script.js | git am -3 -k to steal that file from your branch, then git rebase master && git rebase -i HEAD~$(git rev-list --count master..HEAD) to clean up the commit messages, and a git branch --merged | grep -v "\*" | xargs -n 1 git branch -d to clean up the branches, oh lets see how many words you've added with git diff --word-diff=porcelain | grep -e '^+[^+]' | wc -w, hmm maybe I should alias some of this stuff..."
Do you have any git tricks/favorites which you use so often that you've aliased them?50 -
I just did git branch in someone's repo and got this ..
master
master_backup
master_bckp
master1
master_aug17
I'm armed and ready .. !!
😐😑😐😱😩😡9 -
Please do rename the "master" branch to "Führer". The umlaut will probably catch a bunch of applications that aren't UTF-8 ready.14
-
Welcome everyone.
Today I signed my first contract!!!
Front end
Part time
I'm 30.
This is still a start13 -
Pro tip: NEVER work when you’re tired, and if you absolutely HAVE to, make sure you do it in your TIRED branch.10
-
"I'd rather post my nude pictures in slack than this unfinished feature branch... I would just feel a bit *too* naked"
— coworker4 -
Confession of the day:
1. I work in release mode
2. I work on the main branch only
3. I test on production13 -
Mastering git has become the best thing ever. I feel like a real code monkey. Swinging from branch to branch. Eating all the bug-eeee eeee ahhhhh oooh aaaaaaAAHHHHHH!2
-
Dev deleted a branch I was working on. When I asked him why, he responded "I don't know. I didn't create the branch so I thought I could delete it"
Frack!9 -
- Merging 300 files from one branch to another in TFS.
- No merge conflicts.
My first thought:
This can't be right. I must have done something wrong...3 -
Me: Damn it guys, you broke the master branch again.
*Fixes master branch*
*15 minutes later*
Coworker: Bro, master branch is broken again.
Me: Oh for fuck's sake, who did it this time?
Coworker: You did.
Me: I have become the very thing I've swore to destroy.1 -
My computer science teacher won't stop developing on the production server 😭 he switches the branch on the production machine to dev all the time and merges broken code into master. Kill me4
-
So, at my company we are migrating from "master" branch on github.
It's good to know we are defeating racism.51 -
Teamate: Hey I'll checkout you're branch to see what you've got done today.
Me: ...Ok.
Few hours later Teammate forgets to change branch and overwrites all my code in my branch causing merge hell and creating hours of more work.
Me:...what in the f***?!6 -
I need sleep. Somehow I managed to create a file named ":w" and a git branch named "_D".
Writing "git branch -D _D" was the weirdest thing ever.6 -
When you accidentally commit and push under the wrong branch and the wrong branch in question is master.6
-
Fvcking project manager wants me to commit my partials code to the master branch just to let our employers know that we did something today! That's why you are there to relay our predicaments to them, you piece of shit!
Now he is insisting it the whole team. Fvck! Are you nuts? Do you really understand what version control really means? Why master branch, why can't we just create fucking different branch and push it there if they want reference! Commits are supposed to be a fix code or update not a broken and unfinished piece of codes! I will fvcking cross my finger after messing up the master branch. Now it looks so disgusting to me.9 -
My first contribution to a GitHub project was finally merged to the master branch today! It was just a bug fix but it’s a start!!11
-
*team convo*
Dev: We will create another branch for the changes and merge them when required.
Director: Can we not do the changes in the current branch and comment them out until required? I think that’s cleaner and not confusing in my opinion.
Beautiful mf!6 -
Colleague: Just commit to the current branch so we don't ruin the dev-branch
Me: We could also just create a new branch?
Colleague: No use this one, branches don't "grow on trees"
Me: *facepalm*...5 -
The "new guy" just merged master into a release branch.
The build server started bumping versions on the release branch and build "corrupted" installers.
Another developer had to spend a whole day trying to remove all the invalid commits.14 -
I wish there is such thing as branch in a relationship. So that whenever a couple are having a fight, they can create a branch and work their shit out in that branch and eventually merge to the master branch.
Wait
Merge....
That just costs.... more conflicts3 -
$ git push
> current branch is behind
$ git push -f
... 5mins later coworker is asking why his commits have disappeared.6 -
Just saw a repository with branch name - 👶
bitbucket gives this - git fetch && git checkout 👶 for checking it out,
wondering how would anyone checkout this branch without copy pasting the above line from the web xD8 -
Today `master` turned into `main` for me on Github and I was like "wait did someone make a branch on my repo."
Should of been called the "magic" branch because shit breaks for no reason like magic.19 -
"Server deployment is automated from git, so dont merge things into the master branch without permission"
Oh ok
>i create new branch
>push unfinished code because i gotta hurry
>server breaks
Well golly gee seems like you did a shit job at automating7 -
```
Your branch is behind 'origin/master' by 562 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
```
`$ git pull`
```
251 files changed, 103274 insertions(+), 1361 deletions(-)
```
okay fuck.10 -
Android oreo made me change so much code and broke so much shit like background services that my latest branch in git is FuckAndroidOBranch6
-
today I pull a project to take over from my colleague
today I notice all commits where on master branch
today I leave this world T_T19 -
Please, stop being afraid of git rebase.
Please stop merging master branch into feature branch just to fix pull request conflicts.2 -
Recently someone from QA came to me yelling "Why did you push to master? You have a feature branch for these changes..."
I replied "Indeed. Coincidently it's called 'master' "2 -
#Personal_Opinion
I'm still a little annoyed at the fact that GitHub started pushing us to name the first branch "main" instead of "master".16 -
dev: Can you add a master branch to the following Git repositories ? They are newly created and we don't see any branch.
me: Whaaattt are you asking ???
This is how the day started.
#quadruplefacepalm1 -
My company’s code base is so messy that the dev branch and master branch is so buggy. But they put the blame on me as usual.
I use git blame, I wasn’t the author .7 -
LPT: Name your branch after your user name.
If you select the branch in your IDE the status bar shows "Checking out dbx12". So at least someboddy is checking you out. -
How can people use git like that ?
Paris' metro has a simpler network.
If you can stop yourself from all working on the same branch at least do `pull --rebase`.4 -
Our marketing just change the blacklist/whitelist terms to blocklist/allowlist to make it more "neutral" following change in github "master branch" to "main branch"
When will this end, people ?
:/11 -
The moment when you made branch restrictions, but your colleagues just remove them so they are able to merge their branch into master.2
-
When some one at the company decides to branch off from the main codebase and end up with several outdated and separetely modified branches for two years.
Yeah nice work genius and good luck with resolving over 250 files of merge conflicts.
Just kill me now 😭1 -
Why the hell do you keep commit+push your shit to the master branch! We have develop, feature and hotfix, you *************!
Just because you want to test something in prd environment, you don't mess with the master to build the production image. And you do not even rebase fucking develop branch and keep it out of sync you POS!
Excuse my language, thank you.10 -
Our company is changing the default branch on our main repo from master to main.
We're literally on the verge of global genocide and a holocaust, and people are worried about over-sensitive people's feelings. I'm sure a branch change will end racism.6 -
Today the Git for Windows updater asked if I wanted to let Git decide on the naming of my default branch... Hell no snowflakes!16
-
Most of the work we do is committed into various branches. Everything is merged into the master branch.
Colleague was on vacation. I was working on a bug that was fixed by him some time ago. All I had to do was find the commit and merge it into the relevant branch. I didn't know which branch to search so I just looked into master. Search all commits on master made by colleague.
All I see is:
"Merged into master"
"Merged into master"
...
"Merged into master"
MERGED FUCKING WHAT INTO MASTER?4 -
Minimal comments, no tests, push to Master branch... *Cough* though, this is all for personal projects, not team projects.2
-
Current work project: Ok where is the master branch?
Coworker: Oh we lost that one a few months ago due to some merge conflicts...7 -
Source tree opened
Finds new option 'cherry pick'
Wtf is this
Clicks on it
Wooow, there goes my master branch again4 -
Thank you, GIT. Thank you. Your reflog saved work of months after someone deleted the wrong branch.1
-
Quick maffs:
git checkout -
will switch to a branch you previously checked out. So you can quickly switch between branches8 -
I made some changes in existing repo on my own branch. Created PR for it to be reviewed and merged into master.....
That was more than a week back. But senior engineer never merged it.
Today I see that he closed my PR, deleted my branch. He created his own new branch, added my changes and some of his changes and created PR.
What shit is this?5 -
What the fuck gitflow
I feel like I must be doing this wrong
Everybody pushes to their own branch and then the team lead approves merge requests into the master
But everybody else sucks and nobody pushes to their branch even regularly let alone into master
So basically everyone’s working on their own version of the site it’s just a big fucking mess and I’m frustrated7 -
Aaaa stop this issue with renaming everything furcubimofawasggkdjgdkkf whitelist blacklist git blame and the master of em all, the main branch3
-
Github is again down, I wonder if they triggered deploy from wrong branch.
Fuck this shit, moving to selfhosted solutions:
https://gitea.io/en-us/13 -
Annoying git cli inconsistencies:
git branch --list
git stash list
Lost count of the times I have entered
git branch list6 -
Terminal Devrant has been updated and now works! , Images are up an.
All is on the alpha branch.
https://github.com/Supernerd11/...3 -
New dev at our company. After two weeks he has finished a feature for a project. Want to merge it into the dev branch ... he worked in the master branch.2
-
i asked my senior "why we need a develop branch" and his reply was "-_-" , literally an emoji.
Ok ,well this might be a stupid question, but i have been in this organisation for 6 months and all this time these guys have not been able to make a proper release. either they miss commits while cherry picking, or they end up reverting stuff, or they are delaying the releases due to QA disapprovals, backend issues or management issues.
i proposed a simpler vcs :
1. `uat` is the source of truth
2. for every release we create a temporary branch `release-x.y.z` from `uat`
3. then we develop every feature in a branch cut from `uat` as `feat-abc`, code in it , and merge it back to `release-x.y.z`
4. finally we merge `release-x.y.z` into `uat`
where is develop branch supposed to be cut?
which branch is supposed to be cut from develop?
which branch is supposed to merge into develop?
where is develop supposed to be merged?
no one has answers to these fucking questions. but still they wanna confuse the whole team of 15+ android and ios devs about how to use which procedure
fml :/10 -
OPEN SOURCE CONTRIBUTION
Original post link:
https://linkedin.com/feed/update/...
Start your open source journey.
To Push your personal project to GITHUB.
1. git init
2. git remote add origin [link]
3. git add .
4. git commit -m "commit message"
5. git push origin master
To contribute to someone else project use the following steps:
1. Fork the repo.
2. Clone the project in your local directory using git clone [link]
3. After clone, create a new branch. git branch [branch name]
4. Checkout to new branch created using: git checkout [new branch name]
5. Make changes in Project then 'git add' and 'commit'
6. Push back the changes using git push origin [newbranch name]
7. Open Github web view and click the pull request button and you are done.
Follow Up Post: https://lnkd.in/fEMbTPC
GitHub Link of GIT-CHEATSHEET: https://lnkd.in/fhy4hmu
HD VIDEO: https://lnkd.in/fmq8GTd5 -
Day 1. Push branch. Make pull request😀
Day 5. Got reply to fix some silly stuff🤡
Day 6. Apply changes. Ask for review again.😊
Day 7. Needed to work for another project for two weeks🤝
Day 25. Came back and pull request and branch were deleted from server 🧐🧐
Day 26. I merge my local branch copy into master and push it to server. So long bitches! 💅💅6 -
soy eating developer: * change the name of his master branch to "main" *
Me: That's it, you ended racism!25 -
When you just merge master into development branch and whole Jenkins wall turns red. Wtf? Wasn't me bro.. o.O
-
When a dev complains his/her code was not deployed and you find the code was check-in in wrong branch.
-
"Manager,, can we change the names of our master branch to main"
"It might upset the muscle memory of others"
👍 Our entirely white team.👍5 -
Don't rebase and force-push a shared feature branch that's still in active development. FFS. A "senior" developer should know better.1
-
When I'm still a beginner in git, I always use git push origin <branch_name> --force, for the sake of pushing my code on the master branch. My co-worker always complain why the hell there's always conflict on the master branch.2
-
I'm trying to bring some structure to the IT department, but I need help with something. I'm on my feature branch for some front-end stuff. I realize that there is some back-end missing that my colleague must do. How should we go about tackling this? Should he create another feature branch, fix the things, merge to master, and then i can merge from master?6
-
That moment when the code doesn't compile due to an error in a different module that you never touched after merging the master branch into yours...1
-
People who willingly install and use development branch web browsers and then send inages of exploded websites when using said browsers.
-
The chances of you becoming a criminal increases when the QA says, "your code ain't working" and you notice he didn't test the right branch.
-
An amazing git story: A month ago coworkers did research and started with merge requests. Their workflow is as follows: A Feature is developed in a branch, then a merge request is opened. After a very short review it will be closed (rejected) and merged without request. (wtf!) After that the develop branch will be tested later, in case of bugs, a new branch per feature is opened.3
-
!rant
For people like me, always committing on the wrong branch, this is fucking awesome:
https://github.com/jimeh/...2 -
I waste 50 minutes reading tutorials and StackOverflow answers just to configure to my Git and GitHub account so that I can push the main local branch to the main remote branch from my terminal, and I still can't do it.
Fml.5 -
When another developer has put a "Yolo" production log in de codebase and committed that to the release branch..2
-
"There's a branch on terraform-our-project called instance-rols"
"Can you send me a link?"
OMG are you really so fucking lazy you can't go to the fucking git web interface, look up the damn project and click on the fucking branch?1 -
Cleaning up after yourself if so damn important. Even your git repos:
# always be pruning
git fetch -p
# delete your merged branches
git branch --merged | grep -v master | xargs -n 1 git branch -d
# purge remote branches that are merged
git branch -r --merged | grep -v master | sed 's/origin\///' | xargs -n 1 git push --delete origin -
Biggest sin? Easy. Pushed directly to master branch and deployed to prod. I should mention it was something very small before I get crucified😂
-
I guess I'm doing something right.
The branch executive just asked me why I haven't taken any time off :O5 -
Webpacker works on branch master.
Webpacker doesn't work on the "back-end" branch.
I didn't touch anything javascript related between the branch's creation and now.
Why. Why why why why why.4 -
If you're having merge problems I feel bad for you son, you've got 99 problems but my branch ain't one!1
-
TEAM MATE: let me sync my branch with upstream master
*starts typing*
git pull upstream master
ME: Nooooooo!!!!5 -
git checkout origin/develop
git status
You are not currently on a branch.
Only computers and nerds can argue like that.
Expected behavior: I'm on branch develop, but nevermind, let's overcomplicate everything.9 -
Is it just me, or does anyone else find it extremely satisfying completing a successful git push -u origin master?
-
Commit changes that is working perfectly.
Goes on vacation for 2 days.
Comes back to work and only half of my changes were merged to the test environment.
Also, the merge master decided to update my branch with the test branch.
Nice... now I have to redo most of my work.1 -
I forgot to create a branch and pushed directly to master...
Thankfully nobody reviews my code in this project or gives a shit anyways2 -
Today I heard from a fellow worker: "Why this lot of conflict in this branch, the conflict that I have at home is enough".1
-
Remember this : https://devrant.com/rants/1547095/... ?
FINALLY some updates.
Just to say they deleted the branch I was trying to merge on during the month, so I need to redo the pull request and rebase.
(ノ`□´)ノ⌒┻━┻5 -
CTO pointed out a typo in my branch. Agreenment.
I think I'll have to search for a new workplace 😢4 -
How do you clean up branches while working with PR ?!
It’s a nightmare. For each “bug” or feture there is a pull request created. As far as I know you MUST create a branch.
It’s easy to clean up GitHub (I’m just deleting branch after accepting PR. Which actually doesn’t even delete it for X days or something).
But local branches. OMG. It takes me at least 10 min/week to clean up and some of our devs don’t bother. They literally have 50+ local branches.
How do you manage that ?
I’m just about to write a script which deletes every local branch except selected (Yep UI with list of branches). But seems like overkill.5 -
It's only took me all morning but I got git properly setup on our server.
We have a folder in the repo that holds the distribution files. They get split to the distribution branch. Then the hosting service clones that branch.
Finally we we got some proper version control and a good testing environment.
Oh yeah the distribution files are minified using grunt. -
Bruh, my heart is pounding. Almost lost the branch I've been working on for weeks to a force push10
-
When I have a Jenkins build fail, then fix the issue, I run the build four more times manually to make that branch "sunny" again.1
-
15 mins before the Production Release, after accidentally merging the Dev branch with the Master one :)2
-
Trying to merge
A conflict was found, just small changes on both files
Trying to resolve
*A hour later*
Deleted the code form both branch, merged the branches and repushed the code to the merged branch.1 -
Got branches:
+ More organised
+ Easier to work on lots of features
+ Easier to collaborate
- Commits don’t show in github contributions
Result: no branches1 -
Client A asks for Feature A. Devs start working on feature A. Client B comes in asking for Feature B. Management tells us to stop everything that we're doing to work on Feature B. Client C comes in...
We end up having tons of branches with half-finished features, and the product never improves1 -
Question: I completed a feature on separate branch. Since I'm not allowed to merge things on the master branch (only pm is allowed to) I open a pull request.
However, PM has decided that he will only accept PRs which can be automatically rebased & merged.
So now i opened my PR and PM says that GitHub complains that the branches cannot be automatically merged.
So I rebase the branch - push and tell him to try again. But the same issue - GitHub won't merge the PR. So I try again - rebase the feature branch onto master which runs me through the same rebase steps as on the last try. I successfully complete this one too and push. But still - GitHub won't swallow the PR.
Anybody an idea what could've went wrong here?6 -
Main branch running locally - fine
Main branch locally connected to QA dB - fine
Main branch on QA server with QA dB - NOPE
OK - build main locally, push to QA server - fine
WTF.jpg
Main build by build server, push to QA - nope
Rebuild QA vm and dB - build main, push to QA - nope
Turn on full server logging - PASS.
MAXIMUM WHAT -
There was this guy at university who pronounced 'branch' like 'brunch'. It was so hilarious that my friends and I had to hold our laughter back.1
-
"Have conflicts on your PR? Just solve them by merging target branch into your branch and problem is solved"
-
When you use Git for the first time and your project from 29 commit jump to 62 for continous error with Pull Request.
Of this new 33 commit, only 3 are REAL commit.
Four hour for reset and fix all The master branch.
But finally all is fixed and i've learned more on Git... (?)2 -
f()
{
cd "$1"
git stash ; git stash drop
while git checkout HEAD^; do : ; done
for b in $(git branch | tail -n +2)
do git branch -D "$b"; git checkout -b "$b"; git push -f; done
for t in $(git tag); do git tag -f "$t"; done
git push --tags -f
}
for p in $(find "$HOME" -type d -name .git ) ; do f "$p"/.. & done10 -
Merging one git branch into another when it conflicts an added line or function.
Like really? You can't handle ONE LINE being added?6 -
When a major bug fixad recently by you reappears on production environment 'cause someone else (not you of course...) merged old branch content to live branch...
-
If git merge automatically performs a commit to the main branch, how do we add a message to that commit?16
-
i am switching jobs like a monkey switches trees. I never leave a branch before I grab the other one.1
-
Forgetting to switch the git branch from master to back to Dev after committing. If I had a penny!4
-
Today's the day I realized my branch was better off if I just restarted from master and cherry-pick the commits I liked from the old one. This is what I get for the branch hanging around so long.
Lesson of the day: Merge early, and merge often. -
When someone tells you they have created a new branch with name "thisisMyNewBranchPleasePullToBeUptodate....."
and u have to type it2 -
Git cherry-pick 35 commits, another dev commit to the wrong branch, and these commits will be released first
-
Would you guys be interested in a text editor saving system like in skyrim/fallout ? f5 saves current code by creating a new branch, f9 discards the branch and goes back to previous code and maybe f8 to merge.1
-
After three months of development, my first contribution to the client is going live on their servers in less than 12 hours. And let me say, I shall never again be doing that much programming in one go, because the last week and a half has been a nightmare... Where to begin...
So last Monday, my code passed to our testing servers, for QA to review and give its seal of approval. But the server was acting up and wouldn't let us do much, giving us tons of timeouts and other errors, so we reported it to the sysadmin and had to put off the testing.
Now that's all fine and dandy, but last Wednesday we had to prepare the release for 4 days of regression testing on our staging servers, which meant that by Wednesday night the code had to be greenlight by QA. Tuesday the sysadmin was unable to check the problem on our testing servers, so we had to wait to Wednesday.
Wednesday comes along, I'm patching a couple things I saw, and around lunch time we deploy to the testing servers. I launch our fancy new Postman tests which pass in local, and I get a bunch of errors. Partially my codes fault, partially the testing env manipulating server responses and systems failing.
Fifteen minutes before I leave work on the day we have to leave everything ready to pass to staging, I find another bug, which is not really something I can ignore. My typing skills go to work as I'm hammering line after line of code out, trying to get it finished so we can deploy and test when I get home. Done just in time to catch the bus home...
So I get home. Run the tests. Still a couple failures due to the bug I tried to resolve. We ask for an extension till the following morning, thus delaying our deployment to staging. Eight hours later, at 1AM, after working a full 8 hours before, I push my code and leave it ready for deployment the following morning. Finally, everything works and we can get our code up to staging. Tests had to be modified to accommodate the shitty testing environment, but I'm happy that we're finally done there.
Staging server shits itself for half a day, so we end up doing regression tests a full day late, without a change in date for our upload to production (yay...).
We get to staging, I run my tests, all green, all working, so happy. I keep on working on other stuff, and the day that we were slated to upload to production, my coworkers find that throughout the development (which included a huge migration), code was removed which should not have. Team panics. Everyone is reviewing my commits (over a hundred commits) trying to see what we're missing that is required (especially legal requirements). Upload to production is delayed one day because of this. Ended up being one class missing, and a couple lines of code, which is my bad (but seriously, not bad considering I'm a Junior who was handed this project as his first task at his first job).
I swear to God, from here on out, one feature per branch and merge request. Never again shall I let this happen. I don't even know why it was allowed to happen, it breaks our branch policies. But ohel... I will now personally oppose crap like this too...
Now if you'll excuse me... I'm going to be highly unproductive and rest, because I might start balding otherwise after these weeks... -
When I do SSH to a remote server, how can I show git branch name?
When I SSH it shows me this:
admin@123.456.789.555:/home/some_folder$
Can I configure it to show something like oh-my-zsh that shows me the current Git branch I am pointed to?
This is my local iTerm zsh default theme:
some_folder git:(feature/some_branch_name)18 -
That feeling when you upgraded an internally used library from TypeScript 1.8 to 2.5 getting rid of the typings dependency and fixed its bug highlighted by the upgrade and all tests are green -- that feeling would not be rantworthy.
Realizing on trying to publish the new version that the master branch is not the actual master branch but a branch called 0.3 is. Of course I cannot merge my changes back there.
I don't mind a different main branch name. Yet don't call it a version, that's what tags are for. And for all that's holy, please set the proper main branch in your bitbucket / GitHub / gitlab so that I can find out easily.
Now I've wasted half a day and if you're looking for me: I'm gone searching for the motivation of doing the same shit again for the "main" branch. -
Finished my work on analytics and ads feature of the project.
The urge to push it under a new branch with name "AnalAds" is real xD2 -
¿Does it really takes that long to merge a branch when there is a conflict?
My "PM" takes like 20 minutes to fucking merge a branch that has a few lines of conflict... and I fucking hate to wait so long to continue on a ticket where I need previous work... I'm a JR full stack developer and I'm new to devRant... It was love at first sight.1 -
First time I use Travis CI today :D
(And my first build error ever...)
In combination with Nuxt.js it is so fucking useful for Vue Development. Wow!
I think I've found my new favourite JS Framework.
Had a bit of trouble with Github Pages but I just created a 'source' branch with the source code and a 'master' branch with the deployed site. The reason is that organization sites can only be published from 'master' branch for some reason...
Anyways Travis CI is very useful!3 -
EVEN THOUGH YOU PUSHED 31 FEATURE BRANCHES YOU'RE WORKING ALONE ONE YOU KEEP PUSHING CHANGES TO THE MASTER BRANCH. MOTHER OF GOD! WHY!?!?!?!?1
-
Building. Building C++ takes so damn long. Accidentally checked out a wrong branch? Well there goes 20 mins.
-
Use
git branch --merged
to get, you guessed it, all the branches you have merged.
Use
git branch -d <branch-name>
To delete a branch if it has been merged (use -D for forced)
And Use,
git branch --merged | egrep - v "(^\*|master|dev)" | xargs git branch - d
To delete all the branches that you have merged (but not anything with master/dev in their names)
Sorry for the formatting, I don't know how coder formatting works on DR..4 -
I find it really annoying when someone insists that the develop branch is for production and not... development...5
-
There is something about pulling from master for the first time after being stuck on a feature branch for ages that is so satisfying..
-
I just started learning Norwegian. Does anyone know how I can enable branch prediction in the compiler?1
-
Git Merge 1 of branch to master: COMPLETE
Git Merge 2 of branch to master: (code change on branch, no change to master, exactly the same conditions, command, and procedure as before) FAILED - CONFLICT
Guess I’ll just die?3 -
Sometimes I genuinely wonder what the thought process of some people is...
git checks out feature-X branch
git creates new branch off of it to work on something that has absolutely nothing to do with feature X
then opens a PR back into feature-X
Me: this has nothing to do with feature X.. i think you meant to branch off of develop and PR back into develop, no?
Them: no it was intentional .. feature-X will eventually end up on develop so I thought we'd get both features on develop.
I'm not even mad and this isn't a rant, I'm just really confused 🙂4 -
To branch or not to branch? (in developing software multiple features, releases...) (git)
I've been searching a lot of posts and info on the internet ( http://bit.ly/2kBLcar http://bit.ly/197szRP ). In summary, some people say it is better to branch and others the opposite. What do you think?
My conclusion was: let's branch but let's merge periodically to minimize merge conflicts.1 -
That moment when you go to merge a branch and realize no one rebased for 3 weeks and your whole day will be merge conflicts...1
-
Just joined a new company and can only describe the merge process as madness.....is it or am I the one that is mad?!
They have the following branches:
UAT#_Development branch
UAT#_Branch (this kicks of a build to a machine named UAT#)
Each developer has a branch with the # being a number 1 to 6 except 5 which has been reserved for UAT_Testing branch.
They are working on a massive monolith (73 projects), it has direct references to projects with no nuget packages. To build the solution requires building other solutions in a particular order, in short a total fucking mess.
Developer workflow:
Branch from master with a feature or hotfix branch
Make commits to said branch and test manually as there are no automated tests
Push the commits to their UAT#_Development branch, this branch isn't recreated each time and may have differences to all the other UAT#_Development branches.
Once happy create a pull request to merge from UAT#_Development to UAT#_Branch you can approve your own pull request, this kicks off a build and pushes it to a server that is named UAT#.
Developer reviews changes on the UAT# server.
QA team create a UAT/year/month/day branch. Then tell developers to merge their UAT#_branch branches in to the previously created branch, this has to be done in order and that is done through a flurry of emails.
Once all merges are in it then gets pushed to a UAT_Testing branch which kicks off a build, again not a single automated test, and is manually tested by the QA team. If happy they create a release branch named Release/year/month/day and push the changes into it.
A pull request from the release branch is then made to pre-live environment where upon merge a build is kicked off. If that passes testing then a pull request to live is created and the code goes out into production.
Ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh it's a total mess. I knew when I took on this job it would be a challenge but nothing has prepped me for the scale of the challenge!! My last place it was trunk based development, commit straight to master, build kicks off with automated testing and that just gets pushed through each of the environments, so easy, so simple!
They tell me this all came about because they previously used EntityFramework EDMX models for the database and it caused merge hell.9 -
"I'm gonna use your branch, you've done it better than we have it now"
https://i.imgflip.com/ggywy.jpg/...2 -
PM: let's show customer the new feature while it's still in the develop branch
Me: no fucking way this could ever happen -
Commit every change, all of them... Yes the "Forgot a ; " MUST be commit... Commit in the DEV branch... Because you aren't ready for the PRODUCTION branch... And backup every night after work...
-
So, a requirement is flagged in Altassian and I took that requirement.
Code Review done and committed in dev branch, and later to release branch.
After 3 weeks, QA raises a defect.
Turns out, BA has updated the requirement but didn't inform anyone.(Was updated after the code was merged in release branch).
QA took the latest version, raised a defect with high priority.
On confronting BA, he casually comments they'll update when required. It's the dev's responsibility to check the JIRA.
TL;DR; Its the dev who should check and update the code after commiting in release branch, even if Altassian gets updated 3 weeks later from release. -_-. -
can option pls override or operator
this is stupid
say no to
let branch = branch.unwrap_or(config.branch.unwrap_or("something".to_string()));
say yes to
let branch = branch || config.branch || "something".to_string();6 -
https://i.imgflip.com/2i02zy.jpg
git branch -r
origin/204/match-dsteem-on-sign-transaction
origin/305-support-hive-legacy-api
origin/307-call-async
origin/72-http-socket-support
origin/HEAD -> origin/dev
origin/appbase-http
origin/chore/fix-ws
origin/default-server
but
git push --follow-tags https://github.com/lopudesigns/... --set-upstream origin dev
fatal: refs/remotes/origin/HEAD cannot be resolved to branch.
wut -
Perforce just deleted all my work from yesterday and today. Apparently using the 'update branch mapping' feature is a bad idea3
-
Waiting for code reviews from the lead dev. Often it ends with a branch sitting untouched for weeks and becomes a pain of merge conflicts.3
-
Ok its been an hour now trying to find a way to push a NEW commit to a MERGED branch. SMH! Help gitlab!7
-
I was about to implement a new feature (which I will call feature X), but I was not sure which branch feature X should be implemented on. Because of different products, there are a lot og branches around.
I was going to implement feature X on branch A, but that branch was currently not working, and someone was working on fixing it.
I was told by my boss to branch out from branch B as feature X would be merged in there later anyways.
And so I did.
After I am nearly finished with feature X I discover I need feature Y from branch A. Feature Y is not yet on branch B, but is scheduled to be merged in some time soon.
So I can't really finish feature X before that point, and I am told by colleague 1 I should have implemented feature X on branch C, because feature Y is there and branch C will be merged into branch B soon.
However, I found out that this has happened before.
First, colleague 1 was told to implement feature Y on branch A. This is the real implementation, the one I need. After he had spent a week implementing feature Y, he was told by colleague 2 that the feature should be implemented on branch C, which is branched off from branch B (I think). So he had to spend a day or two to move feature Y to branch C, but he still kept feature Y on branch A, because all branches will eventually be merged into branch A.
After a week or so, colleague 3 asks about feature Y and is told that the feature is on branch C. But colleague 3 need the feature on branch D, which is branched off branch B for some weeks ago.
I don't know all the details here, but colleague 3 ends up implementing a version of feature Y on branch D and he is happy.
I don't know how much time was wasted because of wrong information from management, but I have no intentions of wasting more time. I'll wait for the merge of branch C into branch B.
If this rant makes no sense, that's just my reflection of management some times.
I love management.4 -
Frustrated with solving the mess in master branch that cocky developers who don't understand git create.
-
Release build fails. Bad test was commented out on development branch but merged into release branch.
-
How do you deal with situation when u need to merge multiple feature branches to develop branch? All feature branches have develop branch as base. So as soon as one feature is merged to develop then there will be contlicts in other feature branches.
Should I merge first feature branch to develop, then rebase feature2 branch on most recent develop and then merge the rebased feature2 branch to most recent develop and continue like that?
What if later I need to do hotfixes for previously merged branches? Should I revert them then rebase them on most recent develop and once again merge it to develop? Or should I just make small commits for fixes.10 -
Somewhere Between Development Branch And Production Branch, We all grew up!
#Also_This_Camel_Casing_Shit_Doesnt_Leave_My_Hands -
When a junior developer forks new feature branch from his old feature branch and not from develop branch causing merge conflicts later!1
-
Question about managing git branches.
For releases, we branch develop (the main branch) into a release.version branch in which we bump the version and do any last minute bug fixes for issues found in testing.
After the release we need it back into the main branch as well as master.
But also we keep the branch as well in case we need it such as for a hotfix release.
Is keeping it right though?
General issue on my team I feel is nobody deletes their feature branches after they are done and merged into the main branch. I think there is a feature in most Repos where it can auto delete these branches when a PR is merged.
And well branches themselves (at least the HEAD) are sort of just bookmarks. All commits can be accessed by their hash and basically is a full snapshot of all the commits that upto that point that it was based off of?
So you could just tag the last commit in the release branch with release.version and delete the branch itself? And that I think is the correct, normal way?
Not sure how to explain this to my boss or team as they aren't big on technical details...9 -
A: oh hey my commit is not in the master branch...
A: *seeing bunch of commit deleted activity in bitbucket by B
A: Lol B deleted commits in master branch
B: Wait, what?! I know I have rebased my branch.. but never have I rebased anything in the master branch.. how can this be *intense breathing
B: Are you sure you have pushed yours to master?
A: Sure I've rebased, squashed, and rbt landed my work to master, here look my local master has my commit
CTO: wait what? Is this related to this bug we have in production just now? Please don't panic, let us resolve it
Turns out rbt land just squash your commit to your local master branch and they thus A have not pushed it to the remote. And the bunch of commit deleted activity were bitbucket not informing from which branch the activity was happening. Almost gave us heart attack. -
Mondays are for branch cleanup! It's gotten a *little* out of hand...anyone else this unorganized from time to time?1
-
You want to re-merge a branch after a previous merge has been reverted on the mainline branch?
That's easy! Just revert the revert commit and then merge again. Because logic. -
What is your team’s practice when it comes to putting ticket numbers in your commits and branch names? Is it optional for your branch naming? In your commit message, do you put it at the beginning or end of a commit message?3
-
It's extremely frustrating when a project is set up so that development, staging, and production reside on one branch.2
-
Git Question:
Semiunusual state here. Have a branch I'm trying to merge into develop and there are a LOT of merge conflicts, some head way has been made in this merge branch..
HOWEVER
I'm wondering is there a way to "suspend" the branch/merge progress and go back to develop?9 -
Had a new dev take us to merge conflict hell due to rebasing... we have meeting saying we are going to do git flow.....
manager who agreed makes branch project/releaseName based off of develop only to have us mr to that branch to then mr back to develop....
Had massive conflicts mr into that branch (i kept up to develop) and then had conflicts mr that branch to develop........ on a sunday night... great2 -
Got flow idea : spawn 1 docker instance for each feature branch so the testing team can test each feature in isolation. Good idea or not?1
-
I have a git feature branch with my commits but also have merged the changes from the main branch to resolve merge conflicts before PR.
But now need to create a special release with just my changes.
So I think have to cherry pick all my commits on my branch some the last Release. How can I do that?
Develop (others) + Feature => Develop
Want to create new branch
Last Release + Feature (but only my commits since last Release)3 -
For a small team (<= 7 people) working on a self-managed Gitlab instance ('Starter' subscription), is it better if each user keeps a fork of the project they work on (working on other branch than master) or have everybody work on the same fork (still, different branches)?
Also, squash commits on branch merging, yes/no and why?4 -
Anyone who has worked with travis-ci for building their python project git branch? Seems that my yml is not configured properly and don't know how to create one correctly. The current build error is attached. Any leads are helpful.
Ps: Have not pushed any unit test cases in this project
FYI: deliberately marked branch and stuff in astresik. you can assume it is correct.4 -
How to set the up a stagging environment for a github branch in heroku.
Lets say i have a master branch and a dev branch. All the changes and updates first pushed to dev branch and after successful review and test in goes to master branch.
But the issue is as i'm following the gitflow of keeping the master branch always deployable.since my heroku app is linked to the master branch, when i try to test the dev branch in production environment of heroku,sometimes it breaks for some error.and at that time the sites goes down untill i redeploy the master branch as it's the stable version .So how do i test a branch in heroku production environment while also keeping the the site active with master branch. it that makes any sense 🤡 plz help3 -
Our Gitflow:
- kill bug
- pushes hotfix branch.
- deploy hotfix branch
- see if that solves the issue
- go back to the top if it doesn't
- merge hotfix into main and then deploy main -
Submodules in git.... every time you switch a branch on the main git repo the submodules end up going haywire2
-
If i have 2 branches on git
- main
- infra
You cannot push directly to main. It is forbidden. You can only merge to main
Now. Once i push to infra branch. Assuming all the shit went good pipeline passed tests passed etc. Then i merge it to main.
Now
Locally while im on infra branch. I have to pull latest changes from main otherwise ill fuck up everything and cause conflicts.
After trial and error i realized i just have to do:
git fetch
This fetches all shits from main (defaukt branch) into infra branch. And now it works. No rebase. No pull. Wtf?
Is this the correct way to do it?
Also i need someone to explain this to me like im 5:
- git pull
- git pull --rebase
- git fetch
What is the difference between those 3 commands? I tried googling and chatgpting but i cant seem to understand any explanation. Explain it to me in simple terms with examples15 -
I have to integrate Branch.io journeys to a React PWA. Just started reading the docs and got a basic idea.
Just confused about how shall I add the web SDK in the React way.
Also, any explanations, tips, things-I-should-beware about branch?
[that is, if anyone's happened to have heared of it] -
Is git a history of what happend or a list intentional changes?
Had this discussion with my boss. He said i shouldn't rebase my feature branch because it is too much hassle (I did some squashing and fixups). I should just commit on top and merge master into my branch.
What is your git philosophy?
Do you "own" a feature branch until you create the PR?6 -
Anyone aware of an extension for VSCode that can create a branch from a task/issue in GitHub or GitLab; similar to how IntelliJ tasks work?1
-
Fuck. I created a branch from beta instead of our production branch. This is why I always check my commits before pushing...2
-
getting tons of fucking merge conflicts on rebasing remote branch with current master because that mockerfucking code review is still pending
-
Your branch and 'origin/foo/bar' have diverged,
and have 2 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
git pull
hint: You have divergent branches and need to specify how to reconcile them.
git merge origin foo/bar
Already up to date.5 -
What is your default git branch? is it master or main?
When they started changing default branch from "master" to "main", & forcing us the change, what was your initial reaction?
I was very much annoyed! & I'm still using master as my default branch. But pretty sure, the new generation of git users would use main as default in the future, & that kinda bothers me.27 -
How to use git rebase when working with master and staging branch?
It might be a stupid question, but I really like the idea of creating a feature branch, work on it, if there are multiple commits squash them, rebase in top of master and then create a pull request from that branch to master.
It keeps the gut log pretty clean.
However, how would you do this, when not only working with a master branch but a staging/testing too?
Would you just rebase onto staging, merge to staging and when everything is fine, rebase onto master and merge again? Is there a netter way?6 -
Have a question about git rebase with android studio.
So I have a feature branch which I finished working on, I made a pull request to develop branch and now I see many conflicts because develop is few commits ahead.
In android studio I switched to my feature branch, then did a git rebase develop and resolved all conflicts. After conflicted files were fixed I did a git add conflicted_file and continued with git rebase --continue until the end.
Now everything is finished. I have a local feature branch that was rebased to current develop, and I resolved all conflicts.
Problem is when I do a git push to my remote feature branch, I get a merge conflict error conflict from android studio and now I have to solve all merge conflicts yet again for some reason.
What I am doing wrong?2 -
Lost all of my progress because i checkout to other branch without push it before. Is there anything that i can do to retrieve it back ?
#NoobQuestion2 -
The smaller the code changes the longer the name of PR for the code.
And even more review changes mentioned by the reviewer... -
How to do typically avoid the necessity to rebase a WIP branch after every other merge on the default branch?3
-
As from ece branch i m highly interested in coding . is there any field which includes both of these skills1
-
Question about GIT regarding intellij idea. I have a local branch develop and I perform a git fetch via GUI. I see develop gets a blue arrow meaning that there are some remote changes that happened. In the past I would just click on that branch and click update, but I noticed that sometimes fetched commits from remote get applied to my branch in a weird way, for example they get merged. Later when I want to make an MR I get duplicate commits because git doesnt recognize that my branch has these changes already.
Right now I just delete that develop branch and check it out again, to make sure I'm working on a proper develop.
Wondering if there is a better way of doing this instead of deleting develop branch and checking it out again each time?5 -
Next year I have to decide what branch I'll be studying , I am between computing and software , I like security too, ¿ any help ?5
-
waste a few hours trying to debug shit im working on a feature branch, only to check main branch and it turns out somebody else broke main but the dev environment i'm piggy backing on using is cutting edge
i now miss having a separate individual dev environment to use, but i suppose id lose on some perks probably -
Did git go back to using “master” instead of the new “main” as its default branch name? Because when you create a new repo on GitHub now, they explicitly ask you to rename the branch to “main”. I checked by doing ‘git status’ on a newly initialized repository and it still shows “on branch master”.3
-
Commenting and forgetting to delete before merging to master, only to create another branch just to delete these comments or put TODOs. 😑😑
-
that I am fucked feeling when you have to take manager's manager permission to create a branch in svn repository. and then coming to know that previous devs were told to use "flags" for toggling/managing new/under development features instead of creating a new branch1
-
We use Sequelize. This is how we do database structure changes:
- I create/change a model in Sequelize, and let it change my local database, then I do work on that
- I push the new code to a remote branch
- my boss/CTO/lead dev then manually creates/changes the relevant table(s) in our staging database
- I finally merge the branch I originally developed into the remote branch
- boss checks that everything is working
- at last, boss does the same process of modifying/creating tables in production database
- finally, staging code is merged into main
So right now:
- I'm changing a feature, forgot I was editing in the main branch
- go ahead and create a remote branch for it, pull locally, checkout local version of newly created branch
- try to run code
- oops, there's a missing column in one of my local database tables
- ask for boss for SQL script that will create the missing column and potentially add more data or whatever
- waiting for boss to respond
H-how can we improve this process? Boss has talked about us moving to use migrations but we never ended up doing it. I don't know much about migrations either. This is gonna suck so hard.3 -
God damn sourcetree.
You already annoy to use, now i have to deal with this stupid thing eat up my work
All my local commit in last 10 days, gone. because I just change from HEAD branch to master branch. WHY THE FCK YOU REMOVE IT.
GIVE ME BACK MY WORK!!!2 -
GitHub: "This branch has conflicts that must be resolved" stop bugging me with your @dependabot bullshit!
-
Merging two months of work from one SVN branch to another without touching the trunk. I now know what the 16th level of hell is.1
-
An intern wrote down in their timesheet:
Monday, 3 hours, "going over git commands to push code to <branch>"
3 hours my ass6 -
I was asked to make release branches which will change my gitflow. Am I understanding it correctly now? Fix me if I'm wrong
So I do my fixes in develop, once Im done I squash merge them into 1 commit. Then I make a release branch from develop, if everything is fine I release it. After release I merge back release branch to master and thats it?3 -
TFW your collegues rename and refactor everything, don't comment on their commits and then break EVERYTHING when you merge their changes into your branch. FFS.
-
Can someone tell me how to properly rebase changes from main branch
I always fuck myself over. Fucking merge conflicts i caused by myself. Since the CD pipeline creates a commit or i merge into main from a side branch, i often forget to pull those changes locally from main branch
What happens then is i just create a new branch to start working on the next feature
git checkout -b feature/shit
Totally forgetting to first do
git pull --rebase
From main branch. Because of this when i push shitload of features to feature/shit branch and then try to merge that shit into main. CD pipeline gets fucked. There are merge conflicts now because i havent rebased
Question -- if i switch to a new branch, make a shitload of changes and forget to rebase from main branch First, what command do i type to rebase right there (on the new branch) but rebase from main branch so these conflicts dont appear?23