Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install QGit client in Ubuntu

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the knowledge about "how to install QGit client in Ubuntu". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

1. Install QT4 Library

To run QGit in ubuntu you need to install the QT4 library first. Since apt is ubuntu's default package manager and qt4 is in the official repository, we install qt4 directly with the apt-get command below.

$ sudo apt-get install qt4-default

2. Download QGit zip pack

After installing Qt4, we need to install git so we can clone the git repository in QGit. Run the apt-get command below.

$ sudo apt-get install git

Now, we're going to clone the QGit client repository using the following git command:

$ git clone git://repo.or.cz/qgit4/redivivus.git Cloning into 'redivivus'... remote: Counting objects: 7128, done.remote: Compressing objects: 100% (2671/2671), done.remote: Total 7128 (delta 5464), reused 5711 (delta 4438)Receiving objects: 100% (7128/7128), 2.39 MiB | 470.00 KiB/s, done.Resolving deltas: 100% (5464/5464), done.Checking connectivity... done.

3. Compile QGit

After cloning, we now go into the redivivus directory and create the makefile we need to compile. Go to the directory and run the following command.

$ cd redivivus

Next, we run the following command to generate a new Makefile from the qmake project file (qgit.pro):

$ qmake qgit.pro

With the Makefile generated, we can now finally compile the qgit source code and generate binaries. First we need to install the make and g++ packages for compilation, since this is a program written in C++.

$ sudo apt-get install make g++

Now we need to compile the code with the make command.

$ make

4. Install QGit

After compiling the QGit source code successfully, we will install it in Ubuntu 14.04 so that it can be executed on the system. So we will run the following command.

$ sudo make install cd src/ && make -f Makefile installmake[1]: Entering directory `/home/arun/redivivus/src'make -f Makefile.Release installmake[2]: Entering directory `/home/arun/redivivus/src'install -m 755 -p "../ bin/qgit" "/usr/lib/x86_64-linux-gnu/qt4/bin/qgit"strip "/usr/lib/x86_64-linux-gnu/qt4/bin/qgit"make[2]: Leaving directory `/home/arun/redivivus/src'make[1]: Leaving directory `/home/arun/redivivus/src'

Next, we need to copy the qgit binary from the bin directory to/usr/bin/so we can run it globally.

$ sudo cp bin/qgit /usr/bin/

5. Create desktop files

Now that we've successfully installed qgit in ubuntu, let's create a desktop file so that QGit can be found in our desktop environment menu or launcher. To do this, we create a new file called qgit.desktop in/usr/share/applications/.

$ sudo nano /usr/share/applications/qgit.desktop

Next copy the following lines into the file.

[Desktop Entry]Name=qgitGenericName=git GUI viewerExec=qgitIcon=qgitType=ApplicationComment=git GUI viewerTerminal=falseMimeType=inode/directory;Categories=Qt;Development;RevisionControl;

When finished, save and exit.

6. Run QGit client

With QGit installed, we can now launch it from any launcher or program menu. To run QGit under the terminal, we can do something like this.

$ qgit

This opens QGit based on the Qt4 framework GUI mode.

QGit Viewer

summary

QGit is a great QT-based git client. It runs on all three platforms Linux, Mac OS X and Microsoft Windows. It helps us to easily browse the history, versions, branches, etc. information provided by the git repository. It reduces the need to use the command line to perform functions such as browsing versions, history, and comparison, and simplifies these tasks graphically. *** A version of qgit is also available in the default repository and you can install it using the apt-get install qgit command. Therefore, QGit makes our work easier and faster with its simple graphical interface.

"How to install QGit client in Ubuntu" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report