User Tools

Site Tools


programing:git

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
programing:git [2025/12/12 01:39] mlivolsiprograming:git [2026/04/24 14:19] (current) mlivolsi
Line 5: Line 5:
 A Good reference: https://education.github.com/git-cheat-sheet-education.pdf A Good reference: https://education.github.com/git-cheat-sheet-education.pdf
  
 +=== Working in the Master Branch ===
  
 If doing work in the master branch If doing work in the master branch
  
   * cd <directory>   * cd <directory>
-  * git pull origin master +  * git pull origin master   (NOTE: master is now main)
   * git add --all   * git add --all
   * git commit   * git commit
-  * git push origin master+  * git push origin master   (NOTE: master is now main)
  
-Creating a branch and merging changes +=== Creating a branch and merging changes ===
 <code> <code>
            mike branch            mike branch
Line 23: Line 24:
  branch                     merge                branch                     merge              
 </code> </code>
 +
  
   * cd <directory>   * cd <directory>
Line 34: Line 36:
  
 This pushes the changes from the mike branch to upstream on github This pushes the changes from the mike branch to upstream on github
 +
 +
 +==== Scenario ====
 +
 +Git complains about a big file after you do a commit.
 +
 +
 +  * git rm --cached scripts/restore/bigfile.dat
 +  * rm 'scripts/restore/bigfile.dat'
 +  * git commit --amend --no-edit
 +  * git push origin master (or main)
 +
 +==== Cloning a Repo ==== 
 +
 +  * cd to the directory you want to clone to
 +  * git clone https://github.com/<project>
 +  * git config --global user.email "your email"
 +  * git config --global user.name "first last"
 +
 +
  
  
programing/git.1765503575.txt.gz · Last modified: by mlivolsi