Difference between revisions of "Git"

From Quantum kot
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Git is a distributed version control system: tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code.
 
Git is a distributed version control system: tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code.
 +
In order to make this work, you must first configure git with your email address and your name that are registered in Gitea. To do this, open a terminal window and issue the commands:
 
== Setup locally ==
 
== Setup locally ==
 
<syntaxhighlight lang="bash" highlight="1,5-7">
 
<syntaxhighlight lang="bash" highlight="1,5-7">
Line 8: Line 9:
 
git config --global user.name "NAME"
 
git config --global user.name "NAME"
 
</syntaxhighlight>
 
</syntaxhighlight>
 
 
  
 
==How to use ==
 
==How to use ==
 +
# Connect to the VPN.
 +
# Clone the project, i.e. 
 +
##<syntaxhighlight lang="python" highlight="1,5-7">
 +
git -c http.sslVerify=false clone https://10.8.0.26:3000/Eugene/QKD.git
 +
</syntaxhighlight>
 +
# Add changed file into a new commit, for example README 
 +
##<syntaxhighlight lang="python" highlight="1,5-7">
 +
git add README.md
 +
</syntaxhighlight>
 +
# Describe the commit
 +
##<syntaxhighlight lang="python" highlight="1,5-7">
 +
git commit -m "README is changed"
 +
</syntaxhighlight>
 +
# Push your commit into the repository
 +
##<syntaxhighlight lang="python" highlight="1,5-7">
 +
git -c http.sslVerify=false push
 +
</syntaxhighlight>

Latest revision as of 08:57, 17 January 2023

Git is a distributed version control system: tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code. In order to make this work, you must first configure git with your email address and your name that are registered in Gitea. To do this, open a terminal window and issue the commands:

Setup locally

git config --global user.email EMAIL
git config --global user.name "NAME"

How to use

  1. Connect to the VPN.
  2. Clone the project, i.e.
    1. git -c http.sslVerify=false clone https://10.8.0.26:3000/Eugene/QKD.git
      
  3. Add changed file into a new commit, for example README
    1. git add README.md
      
  4. Describe the commit
    1. git commit -m "README is changed"
      
  5. Push your commit into the repository
    1. git -c http.sslVerify=false push