- Как установить git в Linux
- How to Install Git on Linux Mint 20
- Installing Git on Linux Mint
- Configuring the Git on Linux Mint 20
- Conclusion
- About the author
- Kamran Sattar Awaisi
- How to install Git on Ubuntu 18.04 / Linux Mint 19?
- Install Git on Ubuntu 18.04 / Linux Mint 19
- Conclusion
- derhuerst / intro.md
- This comment has been minimized.
- alhadhrami commented Nov 9, 2017
- This comment has been minimized.
- rgnest commented Jan 6, 2018 •
- This comment has been minimized.
- mithlesh4257 commented Jan 7, 2018
- This comment has been minimized.
- elseagle commented Jan 18, 2018
- This comment has been minimized.
- Kaarthick912 commented Mar 5, 2018
- This comment has been minimized.
- Aztechtcs commented Mar 11, 2018
- This comment has been minimized.
- Joshua56 commented Mar 30, 2018
- This comment has been minimized.
- Joshua56 commented Mar 30, 2018
- This comment has been minimized.
- reddyvenu commented Apr 10, 2018
- This comment has been minimized.
- imad-bouramana commented Apr 29, 2018
- This comment has been minimized.
- webbertakken commented Aug 15, 2018 •
- This comment has been minimized.
- oscrx commented Sep 13, 2018 •
- This comment has been minimized.
- Princewillsarlex commented Nov 15, 2018
- This comment has been minimized.
- adkumar321 commented Jan 18, 2019
- This comment has been minimized.
- DuncantheeDuncan commented Mar 9, 2019 •
- This comment has been minimized.
- NetJayNoob commented Mar 19, 2019
- This comment has been minimized.
- Anthomy1 commented May 30, 2019
- This comment has been minimized.
- Anthomy1 commented May 30, 2019
- This comment has been minimized.
- virgilwashere commented Jun 4, 2019
- Install git on Ubuntu
- This comment has been minimized.
- virgilwashere commented Jun 4, 2019
- This comment has been minimized.
- sagynov commented Jun 16, 2019
- This comment has been minimized.
- Knlsharma commented Jul 22, 2019
- This comment has been minimized.
- Lucifer8759 commented Jul 23, 2019
- This comment has been minimized.
- mark-nirdesh commented Dec 17, 2019
- This comment has been minimized.
- ocBruno commented Feb 14, 2020
- This comment has been minimized.
- CyberChick111 commented Mar 6, 2020
- This comment has been minimized.
- Phontera commented Mar 31, 2020
- This comment has been minimized.
- gprakarsh commented Aug 10, 2020
- This comment has been minimized.
- ASCassinda commented Aug 25, 2020
- This comment has been minimized.
- Cyber-Guy24 commented Sep 3, 2020
- This comment has been minimized.
- wajeehas commented Sep 13, 2020
- This comment has been minimized.
- derhuerst commented Sep 14, 2020
- This comment has been minimized.
- mahfudivan commented Sep 23, 2020
- This comment has been minimized.
- temoke-levelops commented Nov 5, 2020
- This comment has been minimized.
- mavaddat commented Dec 19, 2020
- This comment has been minimized.
- AssefaDemeke12 commented Dec 26, 2020
- This comment has been minimized.
- Poojap19create commented Mar 26, 2021
- This comment has been minimized.
- mavaddat commented Mar 29, 2021 •
Как установить git в Linux
Давеча ставил git на Linux Mint и опять пришлось загуглить пару моментов. Чтобы больше не допускать таких стыдных страниц в своей биографии, фиксирую набор команд на бумаге, а заодно объясняю всем интересующимся, что я делал и зачем. Если Вы уже устанавливали гит хотя бы раз, ничего нового не узнаете. Но если только начинаете интересоваться им, то минимальный набор команд для начала работы будет полезен. Подробности ниже.
Итак, последовательность действий. Во-первых, гит нужно установить
sudo — в Mint или например, в Debian. Для своей ОС наберите подходящее слово для запуска команды из-под рута.
Гит поставили. Теперь нужно сгенерировать пару ключей: публичный и приватный. Запускаем
Убедимся, что ключи созданы, перейдем в каталог .ssh своей домашней папки и посмотрим, что в ней лежит
Увидим там 2 файла: id_rsa и id_rsa.pub. Все правильно, первый ключ приватный, который хранится на Вашей машине и никому не передается. Второй — публичный. Именно его Вы передаете третьим лицам или ресурсам, чтобы получить доступ в нужные репозитории.
Откроем файл id_rsa.pub и скопируем все его содержимое
Или же как крутые хакеры наберем следующее
Эта волшебная строка скопирует содержимое оного файла в буфер обмена — удобно. Конечно, если у Вас установлена утилита xclip. Если нет, не переживайте, установите ее — sudo apt-get install xclip — и запустите команду заново.
Вот теперь все готово. Ключ скопирован, можно отдавать его админам/коллегам-программистам или прописать его самим, если владелец проекта — это Вы.
Я по сугубо сектантским соображениям предпочитаю bitbucket. Добавляются ключи в нем на этой странице — https://bitbucket.org/account/user/username/ssh-keys/, кнопочка «Add key».
После того, как Ваш ключ будет добавлен, можно приступать к полноценной работе с репозиторием, для начала склонировав его
Однако, прежде чем погружаться в дебри нужного проекта, не забудьте прописать в настройках гита имя и email, что гит и коллеги могли Вас идентифицировать
git config —list покажет нам все настройки, сейчас в списке должны присутствовать 2 вышеуказанные настройки.
А вот теперь можно начинать клонировать проект, коммитить, пушить и делать другие страшные вещи. Что плохого можно сотворить с гитом и как именно это сделать, можно узнать из статьи Мой набор команд при работе с git. А у меня на этом все.
Источник
How to Install Git on Linux Mint 20
Git, developed by Linus Torvalds, is the most popular distributed system for version control. Git is a very efficient platform for open-source projects. Using Git, you can collaborate with the other developers, upload the new changes, keep track of the changes, and many more.
Installing Git on Linux Mint
The Git is included in Linux Mint 20 standard repositories can be installed easily using the apt command.
As always, update and upgrade your Linux Mint 20 system before installing the Git package.
Type the below-given command to update the apt package listing:
Next, upgrade the system with the command:
After successfully updating and upgrading the Linux Mint 20 system, install Git with the command:
Press ‘y’ to continue installing Git.
When the Git is successfully installed, verify the installation:
Git 2.25.1 is successfully installed on my Linux Mint 20.
Configuring the Git on Linux Mint 20
Next, we have to configure Git. The Git can be configured from the command line. Configuring Git refers to setting a name and email address. The name and email are used while committing changes on the Git repository.
Fire up the terminal and use the below-given command syntax to set a global commit name:
Type the below-given command to set the global commit email:
Finally, when the global commit name and email are set, run the below-given command to check and verify the changes:
The output shows that the global commit name and email are sent successfully.
If the changes are not made correctly, or you want to change the global commit name and email any time, then you can edit the configuration settings any time by using the command:
The Git configuration file is opened in the nano editor. You can make any changes in the Git configuration file if you wish to.
Conclusion
Installing Git on Linux Mint 20 is very straightforward. Git is part of the Linux Mint 20 base repositories and can be downloaded and installed with apt command.
About the author
Kamran Sattar Awaisi
I am a software engineer and a research scholar. I like to write article and make tutorial on various IT topics including Python, Cloud Computing, Fog Computing and Deep Learning. I love to use Linux based operating systems.
Источник
How to install Git on Ubuntu 18.04 / Linux Mint 19?
Developers must use all available tools to make quality software. Some of these tools do not go directly to the software or the code but to its management. For example, version control is important to ensure that changes are made to the code in an orderly fashion. In this segment, Git seems to be the most logical alternative for this task. So in this post, we will show you how to install Git on Ubuntu 18.04 and Linux Mint 19.
Git is a free and open source distributed version control system. It is perhaps the most popular within the branch as millions of developers use it to control software versions. Ease of use, community support, and efficient version control are the main features of Git. In addition, it is open source and free, which makes it ideal for all projects.
Of course, Git is available for almost any Linux distribution. It also has versions for Windows or MacOS. So no matter what platform you develop on, you will always have the advantages of using Git.
Install Git on Ubuntu 18.04 / Linux Mint 19
As I mentioned earlier, Git is available for many Linux distributions. And Ubuntu is no exception. For Ubuntu and Linux Mint we have two different ways to install Git.
First, Git is in the official Ubuntu and Linux Mint repositories. However, the available version is somewhat outdated and the development of Git is quite active. Installing Git in this way is quite simple but will deprive you of having the latest version available with all its advantages.
So, open a terminal and run:
1.- Install Git from the main repositories
Then, check the installed version.
2.- Git version
As we can see, the version that is in the official repositories is 2.17. However, the latest version available is 2.21 at the time of writing this post.
Fortunately, there is a PPA for Ubuntu and Linux Mint that we can use to install the latest version of Git very easily.
So, open a terminal and run:
3.- Adding the external repository
Then, refresh the APT cache.
If you already have it installed, run this command.
Or, if you do not have it installed.
After that, check the installed version.
4.- Git latest version installed
So we can install Git on Ubuntu 18.04 and Linux Mint 19 using the PPA of the development team.
Conclusion
Git is quite a reference when it comes to version control. Many developers use it for their daily work and offer a great guarantee for it. In addition, installing it is quite simple and is within everyone’s reach.
Источник
derhuerst / intro.md
Installing Git – the easy way
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Choose one of the following options.
Determine on which Linux distribution your system is based on. See List of Linux distributions – Wikipedia for a list. Most Linux systems – including Ubuntu – are Debian-based.
Debian-based linux systems
Open a terminal window. Copy & paste the following into the terminal window and hit Return . You may be prompted to enter your password.
You can use Git now.
Red Hat-based linux systems
Open a terminal. Copy & paste the following into the terminal window and hit Return . You may be prompted to enter your password.
You can use Git now.
Homebrew […] simplifies the installation of software on the Mac OS X operating system.
Copy & paste the following into the terminal window and hit Return .
You will be offered to install the Command Line Developer Tools from Apple. Confirm by clicking Install. After the installation finished, continue installing Homebrew by hitting Return again.
Step 2 – Install Git
Copy & paste the following into the terminal window and hit Return .
You can use Git now.
Installing Git on Windows
- DownloadGit from Git for Windows and install it.
This comment has been minimized.
Copy link Quote reply
alhadhrami commented Nov 9, 2017
Wrong link in ‘intro.md’ for «Instructions for Windows». I was going to create a pull request, but then remembered that doesn’t exist in gist.
This comment has been minimized.
Copy link Quote reply
rgnest commented Jan 6, 2018 •
You shoud before do «cd» the directrory should be yours home. Or will have error.
I mean macos.
This comment has been minimized.
Copy link Quote reply
mithlesh4257 commented Jan 7, 2018
Git is not installing in Ubuntu. Please help!
This comment has been minimized.
Copy link Quote reply
elseagle commented Jan 18, 2018
@mithlesh4257 try
sudo apt-get update then sudo apt-get upgrade followed by sudo apt-get install git
This comment has been minimized.
Copy link Quote reply
Kaarthick912 commented Mar 5, 2018
sudo yum upgrade
I ran this command and it removed all existing users. It upgraded like 450 packages and removed some users. Anybody know why this happened ?
This comment has been minimized.
Copy link Quote reply
Aztechtcs commented Mar 11, 2018
same problem here
This comment has been minimized.
Copy link Quote reply
Joshua56 commented Mar 30, 2018
I am having the same problem in my linux mint
This comment has been minimized.
Copy link Quote reply
Joshua56 commented Mar 30, 2018
zenity : Depends: libpango-1.0-0 (>= 1.14.0) but it is not going to be installed
Depends: zenity-common (= 3.18.1.1-1ubuntu2) but it is not going to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a s
This the error of the code
This comment has been minimized.
Copy link Quote reply
reddyvenu commented Apr 10, 2018
same problem here
This comment has been minimized.
Copy link Quote reply
imad-bouramana commented Apr 29, 2018
try this repository
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
This comment has been minimized.
Copy link Quote reply
webbertakken commented Aug 15, 2018 •
I used this as a source for PracticalNotes — Homebrew.md because it is very efficient.
This comment has been minimized.
Copy link Quote reply
oscrx commented Sep 13, 2018 •
Wrong link in ‘intro.md’ for «Instructions for Windows». I was going to create a pull request, but then remembered that doesn’t exist in gist.
Exactly this 😀
But thanks for the guide.
This comment has been minimized.
Copy link Quote reply
Princewillsarlex commented Nov 15, 2018
This comment has been minimized.
Copy link Quote reply
adkumar321 commented Jan 18, 2019
sudo apt-get install aptitude
sudo aptitude install git
This comment has been minimized.
Copy link Quote reply
DuncantheeDuncan commented Mar 9, 2019 •
Thanks it now installed
But Git-it command doesn’t work and git-it verify
So what the next step please help
I’m using Kali Linux
This comment has been minimized.
Copy link Quote reply
NetJayNoob commented Mar 19, 2019
I am having issues with setting the port. When I type ‘set port 80’ I get back as an error: «you can’t set option ‘port’. Available options: [‘target’, ‘http_port'» etc. will this affect my check runs later?
This is on Kali Linux, and is after ‘set target 192.168. )
This comment has been minimized.
Copy link Quote reply
Anthomy1 commented May 30, 2019
Thanks it now installed
But Git-it command doesn’t work and git-it verify
So what the next step please help
I’m using Kali Linux
This comment has been minimized.
Copy link Quote reply
Anthomy1 commented May 30, 2019
I need help.
I’m using Kali Linux.
This comment has been minimized.
Copy link Quote reply
virgilwashere commented Jun 4, 2019
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git
Install git on Ubuntu
The most current stable version of Git for Ubuntu.
For release candidates, go to https://launchpad.net/
hub : use github from the command-line
hub is an extension to command-line git that helps you do everyday GitHub tasks without ever leaving the terminal
Hope that helps someone.
This comment has been minimized.
Copy link Quote reply
virgilwashere commented Jun 4, 2019
⚠️ Any additional repositories added to the Kali sources.list file will most likely BREAK YOUR KALI LINUX INSTALL.
If this doesn’t do it, I’d be real careful now.
This comment has been minimized.
Copy link Quote reply
sagynov commented Jun 16, 2019
This comment has been minimized.
Copy link Quote reply
Knlsharma commented Jul 22, 2019
Use this command to check your current Git version: git —version
This comment has been minimized.
Copy link Quote reply
Lucifer8759 commented Jul 23, 2019
I need help.
I’m using Kali Linux.
This comment has been minimized.
Copy link Quote reply
mark-nirdesh commented Dec 17, 2019
I need help.
I’m using Kali Linux.
why use shell ?
use sudo apt-get install git
This comment has been minimized.
Copy link Quote reply
ocBruno commented Feb 14, 2020
Just a heads up!
The Instructions for Windows is linking to the linux instructions
This comment has been minimized.
Copy link Quote reply
CyberChick111 commented Mar 6, 2020
@mithlesh4257 try
sudo apt-get update then sudo apt-get upgrade followed by sudo apt-get install git
This one worked!! Thanks
This comment has been minimized.
Copy link Quote reply
Phontera commented Mar 31, 2020
It worked! Thank you.
This comment has been minimized.
Copy link Quote reply
gprakarsh commented Aug 10, 2020
The link for the Mac Download is outdated. This is the one that should be used —
/bin/bash -c «$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)»
This comment has been minimized.
Copy link Quote reply
ASCassinda commented Aug 25, 2020
This comment has been minimized.
Copy link Quote reply
Cyber-Guy24 commented Sep 3, 2020
Thanks mark-nirdesh that worked for me as well
This comment has been minimized.
Copy link Quote reply
wajeehas commented Sep 13, 2020
I have tried installing homebrew via mac os terminal, but it keeps asking me for a password. does anyone know which password this is? it comes up as a key sign.
This comment has been minimized.
Copy link Quote reply
derhuerst commented Sep 14, 2020
I have tried installing homebrew via mac os terminal, but it keeps asking me for a password. does anyone know which password this is? it comes up as a key sign.
It looks like it uses sudo to install itself to a specific location on your computer; sudo requires your password. You will have to put your macOS user’s password.
This is badly designed, it should actually explain why it is using sudo .
This comment has been minimized.
Copy link Quote reply
mahfudivan commented Sep 23, 2020
I have tried installing homebrew via mac os terminal, but it keeps asking me for a password. does anyone know which password this is? it comes up as a key sign.
your laptop password, I use a macbook, I also enter my laptop password
This comment has been minimized.
Copy link Quote reply
temoke-levelops commented Nov 5, 2020
Works for Mac! Where do I give thumbs up?
This comment has been minimized.
Copy link Quote reply
mavaddat commented Dec 19, 2020
why use shell ?
use sudo apt-get install git
They (incorrectly) copied the entire markdown-laden code-block and pasted that into the bash terminal, which of course bash cannot interpret as a command. Do not paste the markdown (e.g., «`shell ) into bash — that part is just for formatting the code on GitHub.
This comment has been minimized.
Copy link Quote reply
AssefaDemeke12 commented Dec 26, 2020
git hub setup for linux
This comment has been minimized.
Copy link Quote reply
Poojap19create commented Mar 26, 2021
I am getting an error while installing git for UBUNTU Can anybody help please
This comment has been minimized.
Copy link Quote reply
mavaddat commented Mar 29, 2021 •
I am getting an error while installing git for UBUNTU Can anybody help please
Your Ubuntu version is no longer maintained. You need to update your distribution to a version that is within its support lifetime. For example, try using this upgrade combination:
Источник