Adds informations on git commands
This commit is contained in:
		
							parent
							
								
									639e986b53
								
							
						
					
					
						commit
						6dd1bc9e10
					
				
							
								
								
									
										60
									
								
								Readme.md
								
								
								
								
							
							
						
						
									
										60
									
								
								Readme.md
								
								
								
								
							| 
						 | 
				
			
			@ -12,6 +12,7 @@
 | 
			
		|||
## Remote Execution
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Basic commands
 | 
			
		||||
=================
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -77,6 +78,62 @@ Date:   Thu Apr 1 12:11:34 2021 +0200
 | 
			
		|||
    First Commit
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## SHARE & UPDATE
 | 
			
		||||
### Retrieving updates from another repository and updating local repos
 | 
			
		||||
=================================
 | 
			
		||||
 | 
			
		||||
add a git URL as an alias
 | 
			
		||||
 | 
			
		||||
>git remote add [alias] [url]
 | 
			
		||||
 | 
			
		||||
fetch down all the branches from that Git remote
 | 
			
		||||
 | 
			
		||||
>git fetch [alias]
 | 
			
		||||
 | 
			
		||||
merge a remote branch into your current branch to bring it up to date
 | 
			
		||||
>git merge [alias]/[branch]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Transmit local branch commits to the remote repository branch
 | 
			
		||||
 | 
			
		||||
>git push [alias] [branch]
 | 
			
		||||
 | 
			
		||||
>git pull
 | 
			
		||||
 | 
			
		||||
fetch and merge any commits from the tracking remote branch
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## BRANCH & MERGE
 | 
			
		||||
### Isolating work in branches, changing context, and integrating changes
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
>git branch
 | 
			
		||||
 | 
			
		||||
list your branches. a * will appear next to the currently active branch
 | 
			
		||||
 | 
			
		||||
>git branch [branch-name]
 | 
			
		||||
 | 
			
		||||
create a new branch at the current commit
 | 
			
		||||
 | 
			
		||||
>git checkout
 | 
			
		||||
 | 
			
		||||
switch to another branch and check it out into your working directory
 | 
			
		||||
 | 
			
		||||
>git checkout -b|-B <new_branch> [<start point>]
 | 
			
		||||
 | 
			
		||||
Specifying -b causes a new branch to be created as if git-branch(1) were called and then checked out. 
 | 
			
		||||
 | 
			
		||||
If -B is given, <new_branch> is created if it doesn’t exist; otherwise, it is reset. This is the transactional equivalent of
 | 
			
		||||
 | 
			
		||||
>git merge [branch]
 | 
			
		||||
 | 
			
		||||
merge the specified branch’s history into the current one
 | 
			
		||||
 | 
			
		||||
>git log
 | 
			
		||||
 | 
			
		||||
show all commits in the current branch’s history
 | 
			
		||||
 | 
			
		||||
## TRACKING PATH CHANGES
 | 
			
		||||
### Versioning file removes and path changes
 | 
			
		||||
=================================
 | 
			
		||||
| 
						 | 
				
			
			@ -93,9 +150,6 @@ Show all commit logs with indication of any paths that moved
 | 
			
		|||
 | 
			
		||||
>git log --stat -M
 | 
			
		||||
 | 
			
		||||
## SHARE & UPDATE
 | 
			
		||||
### Retrieving updates from another repository and updating local repos
 | 
			
		||||
=================================
 | 
			
		||||
 | 
			
		||||
### History
 | 
			
		||||
```bash
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 41 KiB  | 
		Loading…
	
		Reference in New Issue