User Tools

Site Tools


git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
git [2013/07/01 19:49]
k2patel [Backup]
git [2013/07/01 20:02]
k2patel [Setting up GIT]
Line 2: Line 2:
  
 ==== Setting up GIT ==== ==== Setting up GIT ====
 +=== Create Server ===
 +== Define User ==
 +<code bash>
 +git config --global user.name "​k2patel"​
 +git config --global user.email "​k2patel@live.com"​
 +</​code>​
 +
 +== Create location for Repository ==
 +<note tip>​replace location with your desired location</​note>​
 +<code bash>
 +mkdir -p /​data/​git/​bumper.git
 +cd /​data/​git/​bumper.git
 +</​code>​
 +
 +== Create bare repository ==
 +<code bash>
 +git --bare init
 +</​code>​
 +
 +=== Initial Synchronize with client ===
 +== Initializing commit ==
 +<note tip>​replace project location with desired location</​note>​
 +<code bash>
 +cd /​data/​project/​bumper/​
 +git init
 +git add .
 +git commit -m "​Initial Commit"​
 +</​code>​
 +
 +== Define server and push files ==
 +**For Local**
 +<code bash>
 +git remote add origin /​data/​git/​bumper.git
 +git push origin master
 +</​code>​
 +
 +**For Remote**
 +<code bash>
 +git remote add origin ketan@reposerver:/​data/​git/​bumper.git
 +git push origin master
 +</​code>​
  
 ==== Backup ==== ==== Backup ====
git.txt ยท Last modified: 2020/08/10 02:35 (external edit)