User Tools

Site Tools


project:git_basics

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
Previous revision
Last revision Both sides next revision
project:git_basics [2017/07/18 15:47]
dp
project:git_basics [2017/07/18 17:01]
dp
Line 33: Line 33:
 ''clone'' kloniranje svega s remote repozitorija i kopiranje na local repozitorij ''clone'' kloniranje svega s remote repozitorija i kopiranje na local repozitorij
  
-''commit'' changes go to local repo... making safe points+''init'' uđi u folder, initialize a repository on a new folder or existing one 
 + 
 +''.git'' folder u kojem git sprema sve (nije backup) ... delete to destroy repository 
 + 
 +''.gitignore'' specify files and file patterns for git to ignore (create file: ''touch .gitignore'' and add e.g. *.log) 
 + 
 +''commit'' changes go to local repo... making safe points... 
 + 
 +''git commit -m "description"'' dodavanje opisa uz commit, u protivnom se otvori vim editor
  
 ''push'' push changes from local to remote ''push'' push changes from local to remote
Line 55: Line 63:
 ''git grep -i'' (case insensitive) ''git grep -i'' (case insensitive)
  
-''git status''+''git status'' check status of the repository ... what files are untracked 
 + 
 +''git add'' stage a file for commit
  
 ''pre commit hook'' (nešto što se projavi prije comminta pa se može nešto napraviti npr. izbrisati spejsove (davor!)) ''pre commit hook'' (nešto što se projavi prije comminta pa se može nešto napraviti npr. izbrisati spejsove (davor!))
Line 71: Line 81:
 ''git push'' ''git push''
  
-''git add .'' ("." current directory)\\  +''git add .'' ("." stage everything in current directory)\\  
-''git add *''+''git add *''\\ 
 +''git add *.txt'' 
 + 
 +''git branch IME_NOVOG_BRANCHA'' create new branch 
 + 
 +''git checkout IME_NOVOG_BRANCHA''  
 + 
 +''git checkout master'' switch back to the main branch 
  
 +''git merge IME_NOVOG_BRANCHA'' ... ali i potencijalni konflikti...
  
 ===== Primjer grupnog rada ===== ===== Primjer grupnog rada =====
project/git_basics.txt · Last modified: 2017/07/19 15:54 by dp