User: Hey so I want to make the best of Raycast as part of Mac experience. Recommend me some good shortcuts I should add
Assistant: Absolutely! Raycast is a super powerful productivity tool on Mac, and creating smart shortcuts can significantly speed up your workflows. Here are some great shortcut ideas you can add to get the best out of Raycast:
1. Quick App Launcher
Shortcut: Launch your most-used apps instantly.
Example: Set shortcuts for apps like Terminal, VSCode, Safari, or Slack.
How: Create a Raycast Script Command that opens apps via open -a "AppName" or just add them to Raycast's built-in app launcher.
2. Clipboard Manager Access
Shortcut: Open clipboard history to quickly paste recent items.
Benefit: Saves time digging through clipboards, especially when multitasking.
3. Create New Note
Shortcut: Quickly create a new note in your preferred note-taking app (Apple Notes, Obsidian, Evernote, etc.)
Example: Use a custom Script Command to launch a note with the current date/time or quick input text.
4. Search Google / Wikipedia / StackOverflow
Shortcut: Quickly search selected text or query keywords without opening a browser first.
Sample Script: Open URLs like https://google.com/search?q={query}
5. Toggle Dark Mode
Shortcut: Switch macOS between dark and light mode rapidly.
How: Use a Script Command (osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to not dark mode')
6. Control Music Playback
Shortcut: Play/Pause or skip tracks in Apple Music, Spotify, etc.
Raycast Extensions: Use built-in Music Player commands or create automation scripts.
7. Send Predefined Messages or Emails
Shortcut: Quickly send templated emails or Slack messages.
Use Case: Daily check-ins, standups, or quick replies.
8. Run Terminal Commands
Assistant
Shortcut: Quick access to your favorite or repetitive terminal commands without opening Terminal.
Example: Run git pull/push, launch docker containers, start local servers.
9. Manage Reminders / To-Do Lists
Shortcut: Quickly add or view reminders from Apple Reminders or Todoist if integrated.
10. Window Management Shortcuts
Shortcut: Move and resize windows to specific positions or desktops.
Example: Maximize current window, move to second monitor, etc.
How: Use tools like yabai with Raycast extensions or AppleScript.
Bonus: Popular Raycast Extensions You Can Tie Shortcuts To
1Password: Fill passwords or copy OTP codes.
GitHub: Quick access to repos, issues, PRs.
AWS: Check resources or trigger scripts.
Notion: Create pages or search your workspace.
Calendar: Quickly create or view events.
How to Add Shortcuts in Raycast
Open Raycast (Cmd + Space default).
Go to Extensions or Script Commands.
Create or install desired commands.
Assign Hotkeys in Raycast Preferences → Extensions or Script Commands.
If you want, I can help you write some sample Raycast Script Commands to get started with any of these! Just let me know which ones sound most useful.
User: Could you teach me git
Assistant: Absolutely! I’d be happy to teach you Git. Git is a powerful version control system that helps you track changes in your code, collaborate with others, and manage your projects efficiently.
Let’s start with the basics:
1. What is Git?
Git is a distributed version control system, meaning every developer has a full copy of the code repository locally.
It tracks changes in your files and helps you revert, branch, and merge code easily.
Used widely in software development to collaborate and manage code history.
2. Key concepts in Git
Repository (repo): A folder where your project’s code and Git history live.
Commit: A snapshot of changes you’ve made with a message describing the changes.
Branch: A separate line of development (think of it like a parallel universe of your code).
Merge: Combine changes from one branch into another.
Remote: A copy of your repo hosted elsewhere (e.g., GitHub, GitLab).
Clone: Downloading a remote repository to your local machine.
3. Basic Git Workflow
Step 1: Initialize a Git Repo (if you don’t already have one)
bash
git init
This creates a hidden .git folder that tracks changes.
Step 2: Add Files to the Staging Area
Before committing, you add files to the staging area:
bash
git add filename # adds a specific file
git add . # adds all changes in current folder
Step 3: Commit Your Changes
bash
git commit -m "Your descriptive commit message"
This saves a snapshot of your staged changes.
Step 4: Connect to a Remote Repository
If you want to push your code to GitHub or another host:
This uploads your local commits to the remote main branch.
Step 6: Pull Latest Changes from Remote
bash
git pull origin main
Fetches and merges changes from the remote to your local branch.
4. Useful Git Commands Cheat Sheet
Command
What it does
git status
Shows changes and current branch
git log
Shows commit history
git branch
Lists branches; git branch new-branch creates one
git checkout branch-name
Switch to another branch
git checkout -b new-branch
Create and switch to a new branch
git merge branch-name
Merge changes from branch-name into current branch
git diff
Show unstaged changes
5. How to Use Git with Raycast?
You can create shortcut scripts in Raycast for common Git tasks, such as:
Quickly check git status
Pull or push changes
Create new branches
Open your repo on GitHub in the browser
Would you like me to help you set up some Raycast shortcuts for Git commands? Or maybe we can practice some example workflows?
Feel free to tell me what your current level is or what you want to focus on: basic version control, branching, collaboration with remotes, conflict resolution, or something else!
User: Let's focus on branching
Assistant:
Great choice! Branching is one of Git’s most powerful features. It allows you to create independent lines of development so you can work on new features, fix bugs, or experiment without affecting the main codebase.
Understanding Branching in Git
The default branch is usually called main or master.
A branch is simply a pointer to a commit.
When you create a new branch, Git creates a new pointer to the current commit, so you can start making changes separately.
You can switch between branches and merge branches to incorporate changes.
Common Branching Commands and Workflows
1. List branches
bash
git branch
Shows all local branches.
The current branch is marked with an asterisk (*).
2. Create a new branch
bash
git branch new-branch
Creates a branch called new-branch based on the current HEAD.
It does not switch to it automatically.
3. Switch to a branch
bash
git checkout new-branch
Moves your working directory to that branch.
Alternatively (Git 2.23+), you can combine create + switch:
bash
git switch -c new-branch
4. Create and switch to a new branch (one step)
bash
git checkout -b new-branch
or
bash
git switch -c new-branch
5. Merge a branch into the current branch
Suppose you want to merge changes from new-branch into your current branch (main for example):
bash
git checkout main # switch to main if not on it
git merge new-branch # merge changes from new-branch
If everything merges cleanly, Git completes automatically.
If conflicts happen, Git will prompt you to resolve them manually.
6. Delete a branch
After merging, to delete a branch locally:
bash
git branch -d new-branch
If the branch hasn’t been merged and you want to delete it forcibly:
bash
git branch -D new-branch
Example Branching Workflow
Start on the main branch:
bash
git checkout main
git pull origin main # make sure it's updated
Create and switch to a new feature branch:
bash
git checkout -b feature-x
Make changes and commit on feature-x:
bash
git add .
git commit -m "Add feature X"
Switch back to main and merge:
bash
git checkout main
git merge feature-x
Push changes to remote:
bash
git push origin main
Delete feature-x if no longer needed:
bash
git branch -d feature-x
Using Branching With Raycast
You can set up Raycast shortcuts or Script Commands for things like:
Would you like me to help you write some Raycast Script Commands for common branching tasks? Or maybe walk you through resolving merge conflicts if they come up?