User Tools

Site Tools


scripting:netdevops

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scripting:netdevops [2021/01/16 15:19] jotasandokuscripting:netdevops [2023/11/02 14:38] (current) – external edit 127.0.0.1
Line 1: Line 1:
-Nick Russo tuto:\\+Search for ''netdevops ansible vagrant cisco'' and complete the sections below. Examples: 
 +  * [[https://www.packetswitch.co.uk/vagrant-netdevops/]] 
 +  * [[https://www.youtube.com/watch?v=tN6R2Tukw0M]] 
 +  * [[https://www.ciscolive.com/c/dam/r/ciscolive/emea/docs/2019/pdf/BRKDCN-2011.pdf]] 
 + 
 + 
 +---- 
 + 
 +Nick Russo tuto:
   * LEAN   * LEAN
   * WIP: Work In Process. In relation to 'lean'   * WIP: Work In Process. In relation to 'lean'
Line 10: Line 18:
  
  
-git pull vs git fetch: pull puts it in your working directoryPull is just a Macro PULL=FETCH+MERGE+Do not pull, just fetch and merge (and check the diff).[[https://longair.net/blog/2009/04/16/git-fetch-and-merge/|External Link]]
    git fetch && git merge origin/master      git fetch && git merge origin/master  
 {{:automation:pullfetchmerge.jpeg?200|}}\\ {{:automation:pullfetchmerge.jpeg?200|}}\\
   * git fetch to know the changes done in the remote repo/branch since your last pull. This is useful to allow for checking before doing an actual pull   * git fetch to know the changes done in the remote repo/branch since your last pull. This is useful to allow for checking before doing an actual pull
 +
   git fetch       git fetch    
-  git diff ...origin+  git diff ...origin  # fetches origin and shows the differences (same as 'git diff master origin/master'
 +  git merge origin/master 
 + 
 +Also we normally use push but it really means: 
 +  git push origin mylocalbranch   # format:  git push <remote> <branch>  
      
 +\\
 Concept of master (my local one) origin/master (remote) Concept of master (my local one) origin/master (remote)
 +
 +
  
 \\ \\
Line 23: Line 39:
   git add .   ! rechech this in my bastion notes   git add .   ! rechech this in my bastion notes
  
-\\ + 
--- vim+---- 
 + 
 + 
 +vim
 :e :bn in vim seems to go tabs before and after!! :e :bn in vim seems to go tabs before and after!!
  
 \\ \\
   git pull: git fetch + git merge   git pull: git fetch + git merge
-  git fetch -p  +  git fetch -p # -p is to prune the remote branch 
-  git branch -all+  git branch -a # shows both local and remote branches
 \\ \\
--- merge + 
 + 
 +---- 
 + 
 +MERGE IN FOUR STEPS 
 +  
 +  git fetch -p   
   git checkout master   git checkout master
-  git merge origin/master +  git merge origin/master   # (local) master is updated to the newest code 
-  git branch -d test+  git branch -d test        # delete (local) brach. No needed, just merged in!
      
 +
  
 ---- ----
 +
  
 ansible  ansible 
Line 47: Line 74:
  
  
----- 
  
 ---- ----
--- vim+ 
 +vim
 :e :bn in vim seems to go tabs before and after!! :e :bn in vim seems to go tabs before and after!!
  
  
----+ 
 +---
          
 git pull: git fetch + git merge git pull: git fetch + git merge
Line 62: Line 91:
 git branch -all git branch -all
  
--- merge + 
 + 
 +---- 
 + 
 + 
 +merge 
 git checkout master git checkout master
 git merge origin master git merge origin master
 git branch -d test git branch -d test
  
----+ 
 +---
 git checkout -- .  # quick rollback? git checkout -- .  # quick rollback?
scripting/netdevops.1610810393.txt.gz · Last modified: (external edit)