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 - "git commit --amend"
-
Ah yes, progress...
Why do SJWs have to infiltrate everything and project their own racist views of the world onto non-problematic terms?
Slavery has existed for as long as humanity and abolishing the terms will definitely not solve slavery and opression.
I am not against Git changing the default name but I am against them doing it in the name of "inclusivity". The technical world exists by merit and not inclusivity. Why make everything about color, race or slavery level?86 -
git add -A
git commit -m "fix bunch of shit.'
git push origin master
**98 files changed
hours later
me: omg I forgot to change the hardcoded IP now it's getting 404
git add -A
git commit --amend
git push origin master --force2 -
So I am conducting an introductory seminar on git and GitHub for juniors and as per my knowledge I've drafted this outline, please add your inputs..
The seminar will be of 1 day only
1. Install and configure Git and Github
2. Digital Signature mapping
3. Git init
4. New Project with HTML
5. Configure remote (git remote add <origin> <url>) ends with .git
6. Git commit (git commit –m “Title” –m “commit message”)
7. Pushing git push (git remote push origin master)
8. Git commit –amend
9. Git pull (git pull origin master)
10. Git checkout (git checkout –b new_branch_name)
11. Do some changes
12. Git push new branch (git remote push origin new_branch_name)
13. Git switch branch (git checkout <name_of_existing_branch>)
14. Pull requests
15. Git log (git log –oneline –graph)15 -
When you make a mistake and try to fix it, but you can't remember how to spell amend...
git commit --ammend
error: unknown command `amend'
git commit -ammend
[branch-name] mend
Huh?
git log
commit #
mend
Created a new commit with message 'mend'. Now to clean this all up and go get some sleep!2 -
Why squash commits when you can just --amend the commit and git push -f
#SecretsOfADumpsterFireDeveloper4 -
let me preface with the fact that I'm now known at my new job for being the resident cli hipster. I can't lay any claims to knowing if it's "better" but I like it, I don't care if you do or don't, it just works for me and my flow
so at my job, we generally squash all our commits into one commit and delete the source branch upon merging; i accidentally committed all my work to an old, already merged branch, so my boss tells me it would be more of a PITA with the weird references we would encounter by merging the branch again, rather than just cherry pick the commits into a new branch, which i'm like "eh, fine.".
HIM: "You want to share your screen so we can resolve this?"
ME: "k"
HIM: "Oh, you won't be able to do this in a terminal, you are going to have to load up a GUI of some sort"
ME: "lawlz, no you don't"
HIM: "i highly doubt you will be able to accomplish that, but if you wanna make an ass of yourself, i'll humor you"
ME: "yeah, watch this"
> git log > log.txt
> git checkout <new branch>
> git cherry-pick <copy-paste-full-commit-hash-here>
> git push
ME: "done"
HIM: "what? there's no way you did it that easily, where are all your other commits???"
ME: "i usually try to amend my commits since we squash them anyhow. it really helps in situations like this"
HIM: "well, you go girl"
roll that up in your fancy degree and smoke it, why don't ya?2 -
!rant
To embrace the TIFO (today I found out)
$git rebase -i <hash>^
You can reorder commits and squash.
I just used it, to amend a commit that was not HEAD with some changes I’ve done later.12 -
Funny thing I just realized.
When I do git commit --amend just after pushing, I have to do git push -uf and that is beautiful.1