Skip to content

Instantly share code, notes, and snippets.

@kostyrev
Last active November 15, 2021 08:28
Show Gist options
  • Select an option

  • Save kostyrev/4dbf5cab1c7b57ed36cf633951c0c0dd to your computer and use it in GitHub Desktop.

Select an option

Save kostyrev/4dbf5cab1c7b57ed36cf633951c0c0dd to your computer and use it in GitHub Desktop.
MRs
git pull --no-edit origin $(git rev-parse --abbrev-ref HEAD) --rebase --ff-only
git checkout -b new-feature
git commit ...

...

открываешь MR проходишь код-ревью если есть замечания по код-ревью, фиксаешь их и пушишь в свой же бранч с форсом

чтобы не было множества коммитов в MR*
*есть ли смысл в отдельных коммитах определяешь, полагаясь на здравый смысл:
есть ли вероятность того, что придется реверить отдельный коммит
P.S. я себе добавил алиасов, что проще набирать

$ grep HEAD ~/.bashrc
alias push='git push -u origin $(git rev-parse --abbrev-ref HEAD)'
alias rebase='git pull --no-edit origin $(git rev-parse --abbrev-ref HEAD) --rebase --ff-only'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment