Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reach some commands on Github for windows

I want to pass github for windows because of easy usage and its user friendly design. But I have to know some codes which i used classical version of Github.

For example how to reach these commands?

"gitk -all"

"git reset --hard HEAD"

"git diff"

Thanks for your help.

like image 381
cethint Avatar asked Aug 25 '12 09:08

cethint


People also ask

How use GitHub command line in Windows?

In the menu bar, select the GitHub Desktop menu, then click Install Command Line Tool. Open Terminal. To launch GitHub Desktop to the last opened repository, type github . To launch GitHub Desktop for a particular repository, type github followed by the path to the repository.

How do I access Git commands?

Press 'Start' button in Windows, type 'cmd' in the search field on the bottom of menu. There you have the command line console. Try to type git --version , if show something like 'git version 1.8. 0.2', you're ready to input all the commands here.

Do Git commands work on Windows?

By default, Git is installed on Linux and macOS computers as a command line option. However, Microsoft Windows does not include a Git command.


2 Answers

Mark Cramer adds in the comments (July 2014):

With GitHub for Windows 2.0 the drop-down menu has changed slightly.
Select the repository you wish to work with (on the left) and then from then "Open in Git Shell" from the drop-down and you'll get a window that will enable you to enter command line commands.


Original answer (April 2013):

Actually, you don't need to download a separate msysgit if you are using GitHub for Windows: it does come with its own msysgit installation within GitHub for Windows (a Portable_Git, as I mentioned here).

You can simply launch a command prompt (Powershell) session, which will use that git.exe from the internal nested "PortableGit":

Commad prompt for GitHub for Windows

In there, you can type any git command you want.

like image 88
VonC Avatar answered Oct 18 '22 08:10

VonC


Just download the http://code.google.com/p/msysgit/downloads and install it, you will have all git commands in your command line.

like image 20
kan Avatar answered Oct 18 '22 10:10

kan