Git summary
A simple and quick command to use Git installed on a company server. In this example, the Git server is accessible at https://my-git.my.company.org and the working directory is located on the development server DEV-SRV-0033.
Create a repository on Git server
Create your repository on https://my-git.my.company.org/
For example in https://my-git.my.company.org/fallout/vault-tec
Clone the directory on your work server
Connect to DEV-SRV-0033 and go to your development server and your home directory:
[lucy-macLean@DEV-SRV-0033:~]$ cd /home/lucy-macLean/ |
Clone the repository from Git on your development server in your home directory:
[lucy-macLean@DEV-SRV-0033:~]$ git clone https://my-git.my.company.org/fallout/vault-tec |
Working
Go to your new directory:
[lucy-macLean@DEV-SRV-0033:~]$ cd /home/lucy-macLean/vault-tec/ |
Add or create all you need in the directory and check your work:
[lucy-macLean@DEV-SRV-0033:~/vault-tec]$ ls -lR |
/home/lucy-macLean/vault-tec/: |
Commit your work
Add all you need to the https://my-git.my.company.org/ git repository:
[lucy-macLean@DEV-SRV-0033:~/vault-tec]$ git add ansible.cfg |
Then commit:
[lucy-macLean@DEV-SRV-0033:~/vault-tec]$ git commit -a -m "Your_Comment" |
Then push:
[lucy-macLean@DEV-SRV-0033:~/vault-tec]$ git push origin master |
Documentation
Internet