![]() All file modifications will be added to the latter. To squash multiple commits into a single one, simply click and drag one commit to another (you will see a "+" symbol). Be aware that this will rewrite your commit history. In the "History" view, simply drag and drop a commit to move it around. Similar to the previous tip, you can cherry-pick a commit by dragging it from the "History" view to the "Working Copy" item in the sidebar, or directly to the HEAD branch. If you drag and drop a branch onto another branch (while optionally holding down ⌥ or ⌘) you will be able to pull, push, merge, or track a branch. Pulling, Pushing, Merging, and Tracking Branches In Tower's sidebar, you can also drag a branch and drop it onto the "Branches" section to create a new branch based on the dragged one. Creating a New Branch or Tagĭrag and drop a commit item onto the "Tags" or "Branches" sections in the sidebar to create a new branch or tag based on that commit. Many complex Git commands can easily be performed in Tower with a simple "Drag and Drop" gesture. We've given the keyboard a lot of love, so let's shift our attention to some interesting actions you can achieve with the mouse. With the Subject of the commit message out of the way, you can either hit ⏎ to jump to the "Body" field or ⌘ + ⏎ to add this commit to the commit history.īONUS TIP: if you're looking for a way to quickly Amend the previous commit, press ⌥ - the "Commit" button will transform into "Amend" and the last commit message will automatically fill the message text field. Writing Better Commit Messages with Tower If that sounds like too much to memorize, worry not: you can just type / in the Commit Subject field and a list of relevant commands will appear. # to address an issue (you can even use keywords such as "closes/fixes/resolves"), provided you have configured a Services account in Tower.Tower can help you in writing a better commit message - try typing the following: This shortcut works from all views, which comes in very handy. ![]() Hit ⌘ + ⇧ + C to quickly activate the commit dialog. ⌘ + ⇧ + E will stage all current changes ( ⌘ + ⇧ + ⌥ + E will perform the opposite).įinally, ⌘ + ⇧ + BACKSPACE will discard any local changes to the selected file. This is the default behavior in Tower, but you can visit the "Preferences" window and set it to "Quick Look" the selected file instead. Press the SPACEBAR to stage the currently selected file. We spend a reasonable amount of time in the "Working Copy" view, so let's see how we can stage files and commit faster. Here are some powerful actions you can perform: Inside a project, press ⌘ + ⇧ + A and start typing - the suggested actions will be contextual. Navigating Between Views with the Keyboard Quick ActionsĬommand Palettes are very popular among developers Tower has a similar feature and it goes by the name of Quick Actions. ⌘ + 6 to show the "Reflog" view (this shortcut will show the view even if you have "Show reflog in sidebar" disabled in the Preferences).įinally, you can press ⌘ + CTRL + S and ⌘ + CTRL + R to easily toggle between "Services" and "Repositories" view.⌘ + 5 to show the "Branches Review" view.Now that you're already inside a project, you can quickly jump to a different view by pressing one of the following keyboard shortcuts: Navigating Between Views with the Keyboard On that screen, you can also determine which folders Tower should ignore. This is the default option, but you can visit the "Advanced" tab in the Preferences window to disable it. Quick Open lists every repository available in your Home Directory - not just the ones you've already opened in the past. Want to open the repository in a new window? Just hit ⌥ + ⏎. Simply start typing to find the project you're looking for. While the input field is empty, the repositories will be sorted by the date they were last opened. To quickly open any repository, press ⇧ + ⌘ + O to launch Tower's "Quick Open" window. We'll look at the most important ones in this guide.įor your convenience, you can download our Tower Cheat Sheet, available for both Mac and Windows. We're big fans of keyboard shortcuts (as this article may suggest) and Tower has plenty of them. While there is nothing wrong with clicking around, you can navigate between projects and views much faster if you master a few keyboard shortcuts. Now the user will be prompted to select a branch to rebase onto.Ready? Let's begin! 1. The following is an example of a basic custom git command that runs git rebase -i master. You can add your own custom Git commands to menus easily, and create more complex commands using custom selectors. Sublime Merge is designed to be customized. Before reading this section, take a look at the Command Palette documentation to learn how to add custom entries to the command palette.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |