GithubHelp home page GithubHelp logo

Squash commits feature about support HOT 5 OPEN

Fabricio872 avatar Fabricio872 commented on September 28, 2024 3
Squash commits feature

from support.

Comments (5)

GitFiend avatar GitFiend commented on September 28, 2024 3

I think force push is a bit dangerous and I don't want to add features to GitFiend that can create trouble if I don't also have a feature that gets you out of trouble.

I'm currently working on squash and merge squash. This is probably a better way of doing what you want: This would let you work on a feature branch and then extract those changes to your main branch as a single commit.

from support.

m-sundman avatar m-sundman commented on September 28, 2024 1

I think force push is a bit dangerous

No, no, no. On branches where it's dangerous you restrict it server-side, not client-side! Of course you can't go rewrite history on some main trunk, but that restriction is there regardless of which client you're using, so obviously you want that security check on the server, which is exactly what everyone does. However, on your own branches you do exactly what vhusnullin explains above.

from support.

GitFiend avatar GitFiend commented on September 28, 2024

Hi Fabricio872, this is something I plan to add. In case you didn't already know: If you haven't already pushed the commits you want to squash, you can use the undo feature on those commits and then create a single commit.

from support.

Fabricio872 avatar Fabricio872 commented on September 28, 2024

Hello

I have played for a while with that undo feature and it works great for my use case but why it is not available after I push the changes? I think it could just create a changed local commit and then when I do push it could warn me if I want to force push because a commit with the same id already exists or something like that. Would it be too complicated to implement or is there some issue in the way I imagine GIT works? I am not very much of a GIT expert and I know that force pushing could break things if you are working in a team but for my personal stuff, it is kind of useful sometimes altho I am trying to not make such mistakes in the first place.

from support.

vhusnullin avatar vhusnullin commented on September 28, 2024

Force Push is a feature that I use daily. I create a PR (with pr-branch) which is deployed and tested on servers. Then I fix something and continue committing to the same PR-branch, I want to combine my new commit with the old one on server PR-branch i.e. replace both commits with one combined - which requires force push.

from support.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.