Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git setup


$ git config --global user.name "Your Name"
$ git config --global user.email "you@youraddress.com"
$ git config --global push.default matching
$ git config --global alias.co checkout
$ git init

Comment

git setup

#view all settings
$ git config --list --show-origin 

#set global configurations for your git
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
git config --global init.defaultBranch main
Comment

git setup

## set your git name and email
git config --global user.name "your username"
git config --global user.email "your email"
## then try to clone a repo
git clone <git-repo-url>

## after that if you are not loged in then git will ask for username and password
## provide the username and password (use personal access token insted of password)
## If you want to avoid providing a username and password every time, you can just store that username and password.
git config --global credential.helper store

## you can check the configaretion with this command
nano ~/.gitconfig
## The username and password will be saved in the file ~/.git-credentials. in the format
nano ~/.git-credentials

## You can also opt for cache to store the username and password instead of disk.
git config --global credential.helper cache
Comment

Git setup

git init [directory]
Comment

git server setup

$ sudo adduser git
$ su git
$ cd
$ mkdir .ssh && chmod 700 .ssh
$ touch .ssh/authorized_keys && chmod 600 .ssh/authorized_keys
Comment

PREVIOUS NEXT
Code Example
Shell :: ionice 
Shell :: ssh key location windows 
Shell :: git copy remote branch to local 
Shell :: create a new repo 
Shell :: generate gpg key 
Shell :: npm latest version 
Shell :: fatal error: jansson.h: Aucun fichier ou dossier de ce type 
Shell :: remove tools 
Shell :: add existing project on github 
Shell :: Dedian/Ubuntu Self Host Your Own Website for Free 
Shell :: sol-merger usage 
Shell :: Target Packages (main) 
Shell :: Result Directory was not created cts android log reports 
Shell :: berew install skype 
Shell :: List files in long format with readable file sizes in Linux 
Shell :: chaning brach name on git 
Shell :: bash store directory list array 
Shell :: linux need manual fsck 
Shell :: how to use a addon installed after creaeting project unreal engine 
Shell :: ros2 galactic build from source 
Shell :: ls show uid gid 
Shell :: debian install libssl_conf.so 
Shell :: use bash path variable in vim 
Shell :: forked repo rebase 
Shell :: z3- solver phon ubunu 
Shell :: cmd if compare more than 
Shell :: error: failed to init transaction 
Shell :: install openzeppelin dependencies for hardhat enviroment 
Shell :: surfshark linux cannot install 
Shell :: how to zip a unzipped folder mac terminal 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =