Mac에 gitk 설치
맥에 gitk를 설치하는 방법을 아는 사람이 있습니까?
그들의 공식 웹 사이트에서 gitk는 git과 함께 제공되는 것처럼 보이지만 내 git ( git version 1.7.12.4 (Apple Git-37)
) 버전은 gitk와 함께 제공되지 않습니다.
brew install gitk
gitk에서는 작동하지 않습니다.
버전 정보 (의견에서 복사) :
- OS X 10.8.2 (12C2034) "마운틴 라이온"
- XCode 버전 4.6 (4H127)
맞습니다. 1.7.12.4 (Apple Git-37)에는 gitk가 포함되어 있지 않습니다. brew를 사용하여 gitk와 함께 제공되는 최신 버전의 git을 설치할 수 있습니다. 더 자세한 지침은 여기에 있습니다 : http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/
터미널에서 다음 명령을 실행하십시오.
brew update
brew install git
git을 연결할 수 없다는 오류가 발생하면 언급 한 파일의 권한 / 소유자를 변경해야 할 수도 있습니다.
완료되면 다음을 실행하십시오.
type -a git
그리고 그것이 표시되는지 확인하십시오 :
/usr/local/bin/git
그렇지 않으면 다음을 실행하십시오.
brew doctor
그리고 경로를 / usr / local / bin을 경로에 더 빨리 배치하도록 변경하십시오. 이제 gitk가 업데이트 된 버전의 git과 함께 경로에 있어야합니다.
방금 같은 문제가 있었고 다음과 같이 해결했습니다.
- http://git-scm.com/download/mac 에서 Mac 용 공식 git 패키지를 다운로드하십시오.
- 패키지를 설치하십시오. 모든 바이너리가 / usr / local / git / bin에 배치됩니다.
- 선택적으로 포함 된 스크립트를 실행하여 터미널 외부에서 gitk에 액세스 할 수 있도록합니다.
- PATH에 / usr / local / git / bin을 추가하거나 별명 (
alias gitk='/usr/local/git/bin/gitk'
)을 사용하십시오.
이미 homebrew를 통해 git을 설치했다면 다음과 같이 업그레이드하십시오.
$ type -a git
/usr/bin/git
$ brew upgrade git
$ type -a git
/usr/local/bin/git
local / bin에있는 사람은 gitk를 갖습니다.
나는 같은 문제가 있었다. 대신 gitx를 설치했습니다.
여기에서 gitx를 설치할 수 있습니다.
패키지를 다운로드하여 설치하십시오. 그런 다음 스포트라이트 검색에서 gitk를 열고 왼쪽 상단으로 이동하십시오. GitX를 클릭하고 터미널 사용을 활성화하십시오.
리포지토리로 가서 간단히 입력하십시오.
$ gitx --all
Gui가 열립니다.
사용 설명서 : http://gitx.frim.nl/user_manual.html
Git Mac 버전은 포함되어 gitk
있지 않지만 brew install git
즉시 액세스 할 수 gitk
있습니다.
MAC sierra 10.12.5를 사용하고 있습니다
이 문제를 해결하는 두 가지 방법이 있습니다.
- 유닉스 웨이
- 사제 방법
1. 유닉스 웨이 :
간단한 4 단계
- 실행
which git
당신의 위치를 알고 터미널에서git
실행합니다. 해당 디렉토리를 열고 폴더gitk
내부를 찾으 십시오bin
. 경로를 복사하십시오 ---/usr/local/git/bin
bash_profile
아직없는 경우 작성하십시오 . 경로에서~/.bash_profile
로컬git
및 위치를 추가하도록을 수정하십시오gitk
. 또는 아래에 작성된 샘플에서 간단히 파스타를 복사하십시오.- 참고 : 이 단계는 El Capitan 이상을 사용 하는 경우 & 알 수없는 색상 이름“lime”오류가 발생하는 경우 관련이 있습니다 --- 텍스트 편집기
gitk
의 위치/usr/local/bin/gitk
에서 파일을 엽니 다 .lime
파일에서 멘션을 모두 찾아서로 바꿉니다"#99FF00"
. 백업하기 전에 백업하십시오. - bash 새로 고침 :
source ~/.bash_profile
& rungitk
샘플 bash_profile
:
# enabling gitk
export PATH=/usr/local/git/bin:$PATH
2. 홈 브루 웨이
주의 – 아래 단계의 대부분은 아마도 sudo
권한이 필요합니다 .
brew update
brew doctor
brew link git
/usr/local/Cellar/git/2.4.0/bin
경로에 추가 한 다음 bash를 다시로드하고 실행하십시오.gitk
- No luck yet? Proceed further.
- Run
which git
& observe if git is still linked to/usr/bin/git
- If yes, then open the directory & locate the was a binary executable.
- Take its backup, may be save with a name git.bak & delete the original file
- Reload the terminal -
source ~/.bash_profile
What I ended up doing was: brew info git
Which gave me info that git was cloned into: /usr/local/Cellar/git/1.9.0
So I just added: /usr/local/Cellar/git/1.9.0/bin to the beginning of my PATH env variable.
Note: I don't know how to use homebrew... just want to get going quickly as I have other things to do... this basically gets gitk running for me so I'm sticking to it for now. (probably not the way to work with homebrew though).
If you happen to already have Fink installed, this worked for me on Yosemite / OS X 10.10.5:
fink install git
Note that as a side effect, other git commands are also using the newer git version (2.5.1) installed by Fink, rather than the version from Apple (2.3.2), which is still there but preempted by my $PATH.
You can also get gitk
with the git
from MacPorts.
sudo port install git
First you need to check which version of git you are running, the one installed with brew should be running on /usr/local/bin/git , you can verify this from a terminal using:
which git
In case git shows up on a different directory you need to run this from a terminal to add it to your path:
echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile
After that you can close and open again your terminal or just run:
source ~/.bash_profile
And voila! In case you are running on OSX Mavericks you might need to install XQuartz.
I had the same problem on Mac 10.7.5 with git version 1.7.12.4
When I ran gitk I got an error:
"Error in startup script: expected version number but got "Git-37)"
while executing
"package vcompare $git_version "1.6.6.2""
invoked from within
"if {[package vcompare $git_version "1.6.6.2"] >= 0} {
set show_notes "--show-notes"
}"
(file "/usr/bin/gitk" line 11587)
When I looked at the code in gitk I saw the line that sets the version.
set git_version [join [lrange [split [lindex [exec git version] end] .] 0 2] .]
This somehow parsed the git version results to Git-37
instead of 1.7.12.4
I just replaced the git_version line with:
set git_version "1.7.12.4"
참고URL : https://stackoverflow.com/questions/17582685/install-gitk-on-mac
'Programing' 카테고리의 다른 글
C #에서 동일한 클래스의 다른 생성자에서 오버로드 된 생성자를 호출 할 수 있습니까? (0) | 2020.05.13 |
---|---|
주어진 날짜의 정확한 주 번호를 얻으십시오 (0) | 2020.05.13 |
AngularJS는 숨겨진 필드 값을 보내지 않습니다 (0) | 2020.05.13 |
'touchstart'및 'click'이벤트를 바인딩하지만 둘 다에 응답하지 않는 방법은 무엇입니까? (0) | 2020.05.13 |
Atom.io 편집기에서 html 형식을 지정하는 명령이 있습니까? (0) | 2020.05.13 |