Posted  by 

Git Bash For Mac

Git Bash For Mac Average ratng: 8,5/10 105 votes
  1. Git Bash For Mac Install
  2. Git Bash For Mac Os X
  3. Git Bash Macros
  4. Download Git Bash For Mac Os
  • Jan 17, 2019  Mac: git's bash integration scripts report modifications when there are none #707. Open wilbaker opened this issue Jan 17, 2019 3 comments Open Mac: git's bash integration scripts report modifications when there are none #707. Wilbaker opened this issue Jan 17, 2019 3 comments.
  • If you are working on Mac OSX or Linux, a single set of instructions shows you how to setup and identity for either Git or Mercurial in these environments. Since you're using a Mac, you should see if the instructions at the given help link solve your problems. To be clear, here is the link again: Set up SSH for Git and Mercurial on Mac OSX/Linux.
  • Git for Windows focuses on offering a lightweight, native set of tools that bring the full feature set of the Git SCM to Windows while providing appropriate user interfaces for experienced Git users and novices alike. Git for Windows provides a BASH emulation used to run Git from the command line.
  • Bash-git is a bash config for your Mac or Linux. Contribute to cloudsben/bash-git development by creating an account on GitHub.

A few swipes of your hand and it’s done for you

  • Edit .bash_profile on Mac
  • Windows Git Bash
  • Try aliases
  • Windows Doskey

Other Git for Windows downloads Git for Windows Setup. 32-bit Git for Windows Setup. 64-bit Git for Windows Setup. Git for Windows Portable ('thumbdrive edition') 32-bit Git for Windows Portable. 64-bit Git for Windows Portable. The current source code release is version 2.23.0. If you want the newer version, you can build it from the source code.

This is a hands-on tutorial on how you can configure and use Terminal and macros to save time working with Git and GitHub. The steps are intended for “newbies” new to the operating system.

Windows users: skip to the Windows installation section.

Default Terminal on MacOS

To open the Terminal program that comes with MacOS:

  1. Click the blue Finder icon at the left side of the Launch bar at the bottom of the screen.
  2. Click Go on the menu or press at the same time shift + command + A keys.
  3. Scroll down to click the click the Utilities folder.

  4. PROTIP: Drag the Terminal icon and drop it on the Launchbar so it’s easier to find in the future.

  5. Click the Terminal icon to open it.

  6. Press command + N to open using the Basic (default) Terminal settings (white background).

    PROTIP: Alternately, enjoy different colors by clicking menu item Shell then New Window and selecting one of the options listed:

    • Grass (dark green) I cd to my public website posts that go to GitHub
    • Ocean (dark blue) I cd to my private notes repository
    • Red Sands I cd to the code repository I’m working on
    • Homebrew (green font on black) I cd to the server I’m working on

Alt Terminal on MacOS

PROTIP: Alternately, some prefer to use a 3rd-party Terminal program which has additional features.

  1. Read about features not in the default program:

    To download and use it:

  2. Open a Terminal (as shown above).
  3. Install Homebrew.
  4. Use Homebrew to download

    brew install -g iterm2

  5. Open a Finder and Go to Applications. Scroll to click iTerm2.

  6. PROTIP: Drag the Terminal2 icon and drop it on the Launchbar so it’s easier to find in the future.

  7. Read its documentation:

Edit .bash_profile on Mac

  1. Install a text editor you want to use.
  2. Open a Terminal window.

  3. If you have a new MacOS machine, create a file on your Home folder that MacOS executes before opening any Terminal window:

    • ~ designates the home folder for you account.
    • '#'>> adds a comment (#) to the bottom of the file in case the file has already been created, rather than wiping out the file.
    • . in front of a file (in *nix systems such as Mac) denotes a hidden file.
  4. In a Terminal, open to edit. Different editors have different commands. In this example, the Nano text editor is being used because Nano is built into MacOS:

    nano ~/.bash_profile

    Git shortcuts on MacOS

    With the ~/.bash_profile file in an editor:

  5. Highlight these lines, then press command+C to copy it your machine’s (invisible) Clipboard:

    Switch programs

  6. Press command+Tab repeatedly until you see the icon for the text editor.

  7. In the text editor, click your mouse at the bottom of the file.

  8. Press command + V to paste from the Clipboard.

  9. Save the file using the command expected by the editor you’re using.

    For Nano, press control + W.

    Update Terminal

  10. Open a new Terminal instance, which loads the new version of bash_profile.

    Try sbp alias for Mac

  11. Instead of typing out source ~/.bash_profile, type:

    sbp

    This invokes the alias defined:

    This command just returns another prompt.

    Edit aliases

    You can delete the aliases you want or add others, then save the file again.

  12. Switch back and forth between the text editor and
  13. Remember to source the file or open a new window.

  14. Skip to create Git container.

Windows Git Bash

  1. Click the Windows icon at the lower-left corner of your Desktop.
  2. Type “Git”. If you see Git Bash, you likely used choco install git to install Git.

    Alternately, you would need to add a folder and edit the Path system environment variable.

  3. PROTIP: Right-click on “Git Bash” and select “Pin to taskbar” so it can be accessed quickly in the future.
  4. Open Notepad: click the Windows search icon, type no and click on Notepad in the list that appears.Alternately, you can use another text editor (such as Visual Studio Code).
  5. Highlight and press Ctrl+C to copy the following to your Clipboard.

    TODO: Figure out a replacement for this:

  6. Click Notepad menu File > Save As.
  7. Save to C:Program FilesGitcmd
  8. For File Name, type .bashrc.
  9. To the right or “Save as Type” click on “Text Documents (*.txt)” and select All files (*.*).

    This is so Windows does not automatically add “.txt” to the file name.

  10. Click Save.

    Container for Git cloning

    Git commands need a GitHub repository to work with. So you’re welcome to my git-utilities repo, which has some commands you may like.

    PROTIP: Setup a container directory to house (group together) repositories you clone from GitHub. This is because cloning creates only the repository name and not the user. Although the author can be found with a git remote -v command, you may want a way to put several repos for the same folder together, or additional related files such as pdf’s and website links.

  11. On Mac: Open a Terminal window
    On Windows, click on the Windows or Search icon, then type Po and right-click “Windows PowerShell” to select “Run as Admistrator. Click Yes to allow.
  12. Begin from your user account’s home page. On Mac or Windows PowerShell:

    cd ~

  13. Create a folder to house your development projects:

    mkdir gits && cd gits

    PROTIP: Instead of gits, some use dev or Sites or Projects to house related software development work, separate from other folders such as “Desktop” and “Document” under your MacOS user account folder.

    Here you can put various files related to Git, such as tutorial PDFs. However, some prefer to put such files in the .git folder that the Git client installer creates under your user home folder. That is a different folder than the .git folder created for each repository cloned.

  14. PROTIP: Create a folder representing the GitHub account to house new websites to be created (substituting “wilsonmar” with your GitHub user name):

    mkdir wilsonmar

  15. Only on MacOS, set permissions to write to the new folder. The $USER subsitute your own user name:

    sudo chown -R $USER wilsonmar
    sudo chmod -R +rwx wilsonmar

    Type in your password when prompted.

  16. Navigate into the containing folder where a new directory will be automatically built by git clone commands:

    cd wilsonmar

    Fork and/or Clone git-utilities

  17. Install a Git client if you have not already.
  18. Open another Terminal instance.
  19. Clone:

    git clone https://github.com/wilsonmar/git-utilities --depth=1

    The depth=1 argument specifies to obtain only the latest commits for each object, thus not obtaining prior history.

    Alternately, if you intend on making changes, on GitHub Fork the repo to your own account, then clone the repo under your own account.

  20. Navigate into the new repo (type cd and press Tab for auto-complete):

    cd git-utilities

Try aliases

Try the aliases defined above for MacOS and Windows:

  1. Instead of typing out git status, type:

    gs

    This invokes the alias defined:

    If there has been no changes, the output is:

  2. Instead of typing out git branch -avv, type:

    gb

    MyRadar provides an extremely fast way to get an overall at-a-glance check at potential radar precipitation headed your way. For the casual weather enthusiast to the seasoned weather professional, we have hi-definition radar, as well as NOAA weather alerts, temperatures, forecasts, and a detailed hurricane tracker; you can even share your own. Aug 09, 2009  Thanks to everyone for making MyRadar so successful, with over 45 million downloads! MyRadar Pro is IDENTICAL to the free version of MyRadar; it comes without the ads by default. MyRadar is a fast, powerful, easy-to-use weather app that displays animated weather radar around your current location and to quickly show what weather is coming your way. Myradar for mac. Thanks to everyone for making MyRadar so successful, with over 45 million downloads! MyRadar is a fast, powerful, easy-to-use weather app that displays animated weather radar around your current location and to quickly show what weather is coming your way. MyRadar for PC is simple and fastest weather App for your Android and Apple smart phones devices. If you don’t like to read weather reports or analyze weather graphs MyRadar for PC give you all the reports on your screen. It can give you animated weather reports by your location in very quick way.

    This invokes the alias defined:

    A sample response:

    [Return to git-flow]

  3. Instead of typing out git log, type:

    gl

    This invokes the alias defined:

    A sample response:

    [Return to git-flow]

  4. Instead of typing out git add . -A;git commit -m'Update';git push, type:

    gbs

    This invokes the alias defined:

    [Return to git-flow]

    Google chromecast apps for mac. Aug 06, 2015  Install Google Chromecast App for Mac then you will be able to view NetFlix and stream your film, music to your TV. Follow this simple step by step to configure.

  5. Instead of typing out git add and git commit for a single commit, type:

    This invokes the alias defined:

    PROTIP: Time saved using this can be huge because this reduces the “friction” to make small incremental changes.

    [Return to git-flow]

  6. Instead of typing out git fetch upstream and git checkout master, type:

    This invokes the alias defined:

    PROTIP: Time saved using this can be huge because this reduces the “friction” to make small incremental changes.

    [Return to git-flow]

    Backup!

  7. When you’re done, save the file again and exit the program using the command expected by the editor you’re using.

    For Nano, press control + X to exit the program.

  8. PROTIP: So that you can recover quickly in case your laptop is no longer available, copy the ~/.bash_profile file to an off-site backup location such as drive.google.com, in a folder called “mac-setup” or whatever you prefer.

Windows Doskey

The Windows equivalant of the alias command on Mac is:

doskey macroName=macroDefinition

Windows Macro parameters are referenced in the definition via $ prefixed positions: $1 through $9 and $* for all.

set “cdMe=cd some_path

Usage (from command line or script)

%cdMe%

See https://superuser.com/questions/560519/how-to-set-an-alias-in-windows-command-line

https://technet.microsoft.com/en-us/library/bb490894.aspx

PROTIP: Many Windows users are limited to save files only in their own user folder. So we’ll go with that limitation.

  1. Navigate

    cd C:Users%USERNAME%

  2. Create:

    mkdir gits

    .bashrc file

More

Git Bash For Mac Install

This is one of a series on Git and GitHub:

Git Bash For Mac Os X

Please enable JavaScript to view the comments powered by Disqus.

Git Bash Macros

To add your supply request file, do the following:

Download Git Bash For Mac Os

  1. From your BitbucketStationSupplies in Bitbucket, click Source to open the source directory. Notice you only have one file, supplies.txt, in your directory.

    • A. Source page: Click the link to open this page.

    • B. Branch selection: Pick the branch you want to view.

    • C. More options button: Click to open a menu with more options, such as 'Add file'.

    • D. Source file area: View the directory of files in Bitbucket.

  2. From the Source page, click the More options button in the top right corner and select Add file from the menu. The More options button only appears after you have added at least one file to the repository. A page for creating the new file opens, as shown in the following image.

    • A. Branch with new file: Change if you want to add file to a different branch.

    • B. New file area: Add content for your new file here.

  3. Enter supplyrequest in the filename field.

  4. Select HTML from the Syntax mode list.

  5. Add the following HTML code to the text area: <p>We are requesting additional supplies. Please send us the following:</p>
    <ul>
    <li>space ice cream</li>
    <li>nerf darts</li>
    <li>telescope light shield</li>
    </ul>

  6. Click Commit. The Commit message field appears with the message: supplyrequest created online with Bitbucket.

  7. Click Commit under the message field.