# If you want only the remote URL, or referential integrity has been broken:
git config --get remote.origin.url
# If you require full output or referential integrity is intact:
git remote show origin
# Set url
git remote set-url origin new.git.url/here
Tampilkan postingan dengan label git. Tampilkan semua postingan
Minggu, 20 September 2020
#/usr/bin/bash
pwd
# output:
# /home/user
ls
# output:
# repo_1.git
# repo_2.git
# repo_3.git
# single line below "for i in `ls`; do cd $i && git init --bare && cd ../; done;"
for i in `ls`
do
cd $i && git init --bare && cd ../;
done
# output:
# Initialized empty Git repository in /home/user/repo_1.git
# Initialized empty Git repository in /home/user/repo_2.git
# Initialized empty Git repository in /home/user/repo_3.git
Minggu, 13 September 2020
See the previouse step here.
First,
apt-get install git-core # maybe suggest installing "git" without "-core"
Next step, i forget..
# SSH Section unstable tutorial, so keep it in mind.
ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub && ssh git@ipaddress "cat >> ~/.ssh/authorized_keys"
# Creating repo (Server side)
inside /home/git
mkdir repo
cd repo
mkdir test.git
git init --bare test.git
cd test.git
git remote add origin git@ipaddress:repo/test.git
# Clone repo (Client side)
cd
mkdir gitlocal
cd gitlocal
git clone git@ipaddress:repo/test.git
# Enter password (it should suing id_rsa.pub rather than login from ssh)
These must be fixed later...
First,
apt-get install git-core # maybe suggest installing "git" without "-core"
Next step, i forget..
# SSH Section unstable tutorial, so keep it in mind.
ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub && ssh git@ipaddress "cat >> ~/.ssh/authorized_keys"
# Creating repo (Server side)
inside /home/git
mkdir repo
cd repo
mkdir test.git
git init --bare test.git
cd test.git
git remote add origin git@ipaddress:repo/test.git
# Clone repo (Client side)
cd
mkdir gitlocal
cd gitlocal
git clone git@ipaddress:repo/test.git
# Enter password (it should suing id_rsa.pub rather than login from ssh)
These must be fixed later...
Selasa, 22 Oktober 2019