All Projects → VirtusLab → git-machete-intellij-plugin

VirtusLab / git-machete-intellij-plugin

Licence: MIT License
Probably the sharpest git repository organizer & rebase/merge workflow automation tool you've ever seen ;)

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects
kotlin
9241 projects
scala
5932 projects
javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to git-machete-intellij-plugin

license-generator-intellij-plugin
Open Source License generator plugin for products on the IntelliJ platform
Stars: ✭ 35 (-52.05%)
Mutual labels:  intellij-plugin
bamboo-soy
An intellij plugin supporting Closure Template language (Soy)
Stars: ✭ 42 (-42.47%)
Mutual labels:  intellij-plugin
sourcegraph-jetbrains
Sourcegraph for JetBrains IDEs (IntelliJ)
Stars: ✭ 34 (-53.42%)
Mutual labels:  intellij-plugin
mybatis-generator-plugin
MyBatis 生成模板代码的逻辑以插件的形式部署
Stars: ✭ 25 (-65.75%)
Mutual labels:  intellij-plugin
Rplugin
R Language support for IntelliJ-based IDEs
Stars: ✭ 49 (-32.88%)
Mutual labels:  intellij-plugin
SpockAdb
Spock Adb Plugin Helps you to have full control of your project
Stars: ✭ 102 (+39.73%)
Mutual labels:  intellij-plugin
idea-carbon-now-sh
IntelliJ IDEA plugin to open the selected code in https://carbon.now.sh
Stars: ✭ 27 (-63.01%)
Mutual labels:  intellij-plugin
intellij-mob
IntelliJ plugin for swift git handover and timer
Stars: ✭ 26 (-64.38%)
Mutual labels:  intellij-plugin
referencer-plugin
"Referencer" plugin for Jetbrains IDEs
Stars: ✭ 20 (-72.6%)
Mutual labels:  intellij-plugin
sbt-idea-example
SBT based IntellJ plugin template project
Stars: ✭ 20 (-72.6%)
Mutual labels:  intellij-plugin
niddler
No description or website provided.
Stars: ✭ 48 (-34.25%)
Mutual labels:  intellij-plugin
material-design-color-palette
🎨Material Design color palette pluin for IntelliJ based IDEs.
Stars: ✭ 19 (-73.97%)
Mutual labels:  intellij-plugin
gradle-cleaner-intellij-plugin
Force clear delaying & no longer needed Gradle tasks.
Stars: ✭ 26 (-64.38%)
Mutual labels:  intellij-plugin
EditorGroups
IntelliJ plugin prototype of https://youtrack.jetbrains.com/issue/IDEA-12130#comment=27-2838171
Stars: ✭ 16 (-78.08%)
Mutual labels:  intellij-plugin
figma-import-plugin
A plugin for Android Studio to import figma resources
Stars: ✭ 24 (-67.12%)
Mutual labels:  intellij-plugin
nocalhost-intellij-plugin
Nocalhost is Cloud Native Dev Environment. Provides nocalhost to help connect IntelliJ IDE and Kubernetes smoothly.
Stars: ✭ 16 (-78.08%)
Mutual labels:  intellij-plugin
gitmoji-plugin
Choose the right emoji emoticon for git commit, make git log commit more interesting.
Stars: ✭ 110 (+50.68%)
Mutual labels:  intellij-plugin
eventbus-plugin
IntelliJ iDEA plugin to work with projects using greenrobot's EventBus library
Stars: ✭ 25 (-65.75%)
Mutual labels:  intellij-plugin
JetBrains-NASM-Language
Plugin that adds NASM assembly language support for the IntelliJ Platform IDEs
Stars: ✭ 79 (+8.22%)
Mutual labels:  intellij-plugin
intellij-investor-dashboard
📈 Investor Dashboard for JetBrains IDEs. Support A Share, H.K. Stocks, U.S. Stocks and Crypto etc.
Stars: ✭ 60 (-17.81%)
Mutual labels:  intellij-plugin

Git Machete IntelliJ Plugin

Join the chat at https://gitter.im/VirtusLab/git-machete CircleCI JetBrains Plugins Downloads License: MIT

💪 Git Machete plugin is a robust tool that simplifies your git related workflow. It's a great complement to the JetBrains products' built-in version control system.

🦅 The bird's eye view provided by Git Machete makes merges/rebases/push/pulls hassle-free even when multiple branches are present in the repository (master/develop, your topic branches, teammate's branches checked out for review, etc.).

👁 A look at a Git Machete tab gives an instant answer to the questions:

  • What branches are in this repository?
  • What is going to be merged (or rebased/pushed/pulled) and to what?

sample status with master, develop and a few topic branches

🎯 With this plugin, you can maintain small, focused, easy-to-review pull requests with little effort.

It is compatible with all JetBrains products (including Android Studio since plugin version 0.9.0). The minimum required version is 2020.1.

🖥 For the console version, check git-machete.

Installing from JetBrains Marketplace

This plugin is available on JetBrains Marketplace.
To install this plugin go to File > Settings > Plugins in your IDE, then make sure you are on Marketplace tab (not Installed), in search box type Git Machete and click Install.
After installation, depending on the IDE version, the restart may be required. In that case, just click Restart IDE and confirm that action in a message box.

Where to find the plugin tab

Git Machete IntelliJ Plugin is available under the Git tool window in the Git Machete tab.
You can also use Ctrl + Alt + Shift + M shortcut to open it.

Getting started with Git Machete

The examples below show a few common situations where Git Machete proves exceptionally useful.

If you are a Git Master or have used the git-machete CLI already, you may want to jump directly to the features.

Scenario 1: Review

Let's start with a very common case of review. Suppose that you work on two branches: sticky-header and fancy-footer (you've split your work among these two branches to keep the PRs small and easily reviewable).

In the meantime, a teammate of yours requested a review of their PR for branch common-scripts...

Git Machete allows you to check out the remote branch with Slide In. Alternatively, you could check out it via git CLI or Git Branches widget in IntelliJ. Once the review is complete, you can simply check out any other branch from the right-click menu or by a double click — master in the example.

Once the branch common-scripts is no longer needed for review, it can be slid out (Slide Out) — deleted from the branch layout.

Scenario 2: Branch update

Some time passed and your teammate has merged the common-scripts before you managed to merge your branches. You are supposed to update master and your branches now.

Firstly, you can fetch all changes from the remote using Fetch All.
As you'd expect, your local master is behind its remote, so you perform Pull to get it in sync. Note that the pull via Git Machete plugin does not require checking out the given branch.

The edge between master and sticky-header turned red. It means that there are some commits belonging to the parent (master) branch that are not reachable from the child (sticky-header). In case of master, these commits came from the recently merged common-scripts.

Let's Checkout and Rebase onto Parent... to put sticky-header back in sync to master. Fortunately, there are no conflicts to resolve.
Once sticky-header is rebased, you can do the same for fancy-footer.

You may want to update the remotes as well. To do so, perform Push... for both of the branches. The push can be done even for a branch that is not currently checked out. Note that force push is required (as you have rebased the branches since the latest push).

After the rebases and pushes, all of your branches are back in sync — both to their parents and to their remotes.

Scenario 3: Commit to parent branch (sequential branch setup)

A review of your sticky-header has been done and all you've applied and committed all the fixes.
Git Machete shows that sticky-header is ahead of its remote. Furthermore, the edge between sticky-header and fancy-footer is red. The solution to this situation will not differ much from the previous scenario...

You can start with Checkout and Rebase Onto Parent... to place fancy-footer back on top of sticky-header. Now Push... both branches. Everything is back in sync again.

Scenario 4: Merge (maintaining linear history)

A PR for your sticky-header branch has been approved and is ready to merge.
To make git revert & git bisect easier and generally simplify diagnostics & providing fixes in production settings, let's stick to linear git history and thus perform merges that do not produce the actual merge commits.
The way to go is to fast-forward merge sticky-footer into master.

Note that Fast-forward Merge To Parent does not require you to check out the branch getting merged (or its parent) beforehand. You can perform it while some other branch is checked out — fancy-footer in our case.

Once the fast-forward merge is complete, the edge between master and sticky-header gets gray, which means that the latter has been merged.
master is now ahead of remote because of the commits from sticky-header. Since master hasn't diverged from its remote tracking branch, Push... does not require force.

You can now Slide Out the merged sticky-header branch. The remaining master and fancy-footer branches are now in sync.

Complete feature list

Please see the feature list for more specific feature description.

Build

Please see the development documentation for instructions on how to build this plugin on your own.

Issue reporting

If you see any bug or just would like to propose any new feature, feel free to create an issue.

When reporting a bug, it'd be very helpful for us if you could enable the IntelliJ logging on a DEBUG level, reproduce a bug and include the logs from IntelliJ in the issue.

Go to Help > Diagnostic Tools > Debug Log Settings and then paste the following lines:

binding
branchlayout
gitcore
gitmachete.backend
gitmachete.frontend.actions
gitmachete.frontend.graph
gitmachete.frontend.ui

Then reproduce the bug and go to Help > Show Log in Files to open the log file.

References

For additional background on what we believe are good practices take a look into our slides presentation. It explains our motivations and gives you an overview of main Git Machete objectives.

For more information about the plugin, see the teaser blog post and the complete feature list.

See also git-machete — a CLI version of this plugin.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].