Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6608291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:35:39+00:00 2026-05-25T19:35:39+00:00

I only use terminal (mac) for git, and I only use git for one

  • 0

I only use terminal (mac) for git, and I only use git for one directory. Is it possible to set the default directory (the directory when terminal is opened) to the directory where I use git, and if so how?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:35:40+00:00Added an answer on May 25, 2026 at 7:35 pm

    As of Mac OS X Lion 10.7, Terminal supports Resume and by default will automatically restore terminals you had open when you quit, restoring their working directories. So, you can just open a new terminal and cd to your git directory, then leave the window open when you Quit. Each time you reopen Terminal, the terminal will be there, in the same directory. (This works for bash by default. If you’re using some other shell, you’ll need to adapt the code in /etc/bashrc to your shell. I’ve posted code for zsh in my answer to Resume Zsh-Terminal (OS X Lion) on SuperUser.)

    You can also arrange for Terminal to start a shell in a particular directory. You can customize or create a “Settings Profile” to issue a “cd” command when it starts:

    Terminal > Preferences > Settings > [profile] > Shell > Startup > Run command

    Enable “Run command” and “Run inside shell”, then set the command to cd your_git_directory. When you open a new terminal with that profile, it will go to your git directory.

    I recommend you Duplicate the current default profile (if you’ve never changed it, the default is “Basic”) using the Action (“gear”) menu at the bottom of the profiles list, then customize that profile.

    Finally, to have it automatically open a terminal with this profile when you open Terminal, set

    Terminal > Preferences > Startup > On Startup, open

    to your custom profile. (On Lion, Resume will restore windows that were open when you quit, rather than perform the startup action. As I mentioned, you can just leave this terminal open when you Quit and it will be restored when you open Terminal again. Or, you can press the Option modifier key when quitting; the Quit menu item will change to “Quit and Discard Windows” and the next time you open Terminal it will perform the startup action.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From a terminal window: When I use the rm command it can only remove
Does Git only use the remote name origin for a repository which was created
I just wonder if it is possible to only use CSS but not javascript
In your IDE/editor of choice, do you use only the default shortcuts out of
When I use pstree I see that lines only go up to the terminal
I use Terminal in Mac with the following command: df -lak | grep File||disk02
I am using the default SVN client on Mac that you use with the
Bluehost only recommends PuTTy. However, is it possible to use ssh keys without any
Should we only use Web-Safe Colors while in design/coding/development for website/apps?
It's my understanding that common wisdom says to only use exceptions for truly exceptional

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.