[[oktatas:programozás:verziókontroll:git|< Git]] ====== Git Linuxon ====== * **Szerző:** Sallai András * Copyright (c) 2020, Sallai András * Szerkesztve: 2023 * Licenc: [[https://creativecommons.org/licenses/by-sa/4.0/|CC BY-SA 4.0]] * Web: https://szit.hu ===== Telepítés ===== Telepítés: apt install git Ellenőrzés: git --version ===== Git GUI ===== ==== git-gui ==== apt install git-gui Indítás: git gui ==== git-cola ==== apt install git-cola Indítás: git-cola ==== gitk ==== apt install gitk Indítás: gitk ===== Bash ===== ==== Várakozási jel beállítása ==== export PS1='[$(git branch 2>/dev/null | grep "^*" | colrm 1 2)] ' export PS1='\e[38;5;20m [$(git branch 2>/dev/null | grep "^*" | colrm 1 2)] ' export PS1='\W \e[38;5;20m [$(git branch 2>/dev/null | grep "^*" | colrm 1 2)]\[\e[00m\] ' Csak az aktuális könyvtár mutatása: export PS1='\W $ ' Esetleg a .bashrc fájlba: git_branch() { git branch 2>/dev/null | grep '^*' | colrm 1 2 } export PS1="\$(git_branch)" ====== Zsh ====== apt install zsh Az első indításkor a következő képernyőt látjukl This is the Z Shell configuration function for new users, zsh-newuser-install. You are seeing this message because you have no zsh startup files (the file .zshenv, .zprofile, .zshrc, .zlogin in the directory ~). This function can help you with a few settings that should make your use of the shell easier. You can: (q) Quit and do nothing. The function will be run again next time. (0) Exit, creating the file ~/.zshrc containing just a comment. That will prevent this function being run again. (1) Continue to the main menu. (2) Populate your ~/.zshrc with the configuration recommended by the system administrator and exit (you will need to edit the file by hand, if so desired). --- Type one of the keys in parentheses --- Írjuk meg magunk a .zsrc fájlt: autoload -Uz vcs_info precmd_vcs_info() { vcs_info } precmd_functions+=( precmd_vcs_info ) setopt prompt_subst RPROMPT=\$vcs_info_msg_0_ zstyle ':vcs_info:git:*' formats '%b' Az agnoster beállítása: * [[oktatas:linux:grafikus_feluelet:zsh]]