Skip to main content
added 2 characters in body
Source Link
Greg Burghardt
  • 46.2k
  • 8
  • 87
  • 150

For the OP, this Linux kernal message thread might be of interest, because it kind of sounds like some members of the OP's team is using Git in a similar manormanner.

There is nothing wrong with using git stash -- especially before a pull -- but using git stash in this manormanner is an anti pattern when there are better workflows in Git.

For the OP, this Linux kernal message thread might be of interest, because it kind of sounds like some members of the OP's team is using Git in a similar manor.

There is nothing wrong with using git stash -- especially before a pull -- but using git stash in this manor is an anti pattern when there are better workflows in Git.

For the OP, this Linux kernal message thread might be of interest, because it kind of sounds like some members of the OP's team is using Git in a similar manner.

There is nothing wrong with using git stash -- especially before a pull -- but using git stash in this manner is an anti pattern when there are better workflows in Git.

added 32 characters in body
Source Link
Greg Burghardt
  • 46.2k
  • 8
  • 87
  • 150
  1. Create new branch
  2. Hack hack hack
  3. Commit broken code
  4. Polish the code and make it work
  5. Commit working code
  6. Rebase and Squash
  7. Test
  8. Push when tests are passing

Now, say you've made several commits during the course of a day. Some commits were good. Some... not so good. The git rebase command in conjunction with squashing your commits is a good way to clean up youyour local commit history. It's nice to merge in one commit to public branches because it keeps the commit history of your team's shared branches clean. After rebasing, you'll want to test again, but if tests pass then you can push one clean commit instead of several dirty ones.

  1. Create new branch
  2. Hack hack hack
  3. Commit broken code
  4. Polish the code and make it work
  5. Commit working code
  6. Rebase and Squash
  7. Push

Now, say you've made several commits during the course of a day. Some commits were good. Some... not so good. The git rebase command in conjunction with squashing your commits is a good way to clean up you local commit history. It's nice to merge in one commit to public branches because it keeps the commit history of your team's shared branches clean. After rebasing, you'll want to test again, but if tests pass then you can push one clean commit instead of several dirty ones.

  1. Create new branch
  2. Hack hack hack
  3. Commit broken code
  4. Polish the code and make it work
  5. Commit working code
  6. Rebase and Squash
  7. Test
  8. Push when tests are passing

Now, say you've made several commits during the course of a day. Some commits were good. Some... not so good. The git rebase command in conjunction with squashing your commits is a good way to clean up your local commit history. It's nice to merge in one commit to public branches because it keeps the commit history of your team's shared branches clean. After rebasing, you'll want to test again, but if tests pass then you can push one clean commit instead of several dirty ones.

Clarifications about git rebase
Source Link
Greg Burghardt
  • 46.2k
  • 8
  • 87
  • 150

The OP seemsWhat I think @RibaldEddie is trying to have a teamsay is that usingyou can use git stash as replacement forin a feature branchesbranch workflow -- and this is true. Furthermore, they areIt's not the use of git stash that is the problem. It is the combination of committing to master and using git stash. This is an anti pattern.

The OP seems to have a team that using git stash as replacement for feature branches. Furthermore, they are committing to master. This is an anti pattern.

What I think @RibaldEddie is trying to say is that you can use git stash in a feature branch workflow -- and this is true. It's not the use of git stash that is the problem. It is the combination of committing to master and using git stash. This is an anti pattern.

Clarifications about git rebase
Source Link
Greg Burghardt
  • 46.2k
  • 8
  • 87
  • 150
Loading
added 639 characters in body
Source Link
Greg Burghardt
  • 46.2k
  • 8
  • 87
  • 150
Loading
Source Link
Greg Burghardt
  • 46.2k
  • 8
  • 87
  • 150
Loading