LNCD

Table of Contents

  • LNCD Home
  • Administration
  • Notebooks
  • Journal Club Presentations
  • Publications
  • Current Projects
  • Completed Projects
  • Current Grants
  • Datasets by Project
  • Brain ROIs and Measures
  • ️Tools And Methods
  • Big Data
  • RA Homepage
  • Recent Changes
  • Maintenance
  • Site Map
  • Random Page
LNCD
Admin » 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
tools:git [2025/09/18 14:13] – willtools:git [2025/09/18 14:23] (current) – [ssh push] will
Line 13: Line 13:
  
 ===== Track Changes ===== ===== Track Changes =====
 +
 +{{:tools:pasted:20250918-141941.png?300}}
  
 On the command line in terminal/with shell, using git follows the ''add'',''commit'',''push'' pattern.  On the command line in terminal/with shell, using git follows the ''add'',''commit'',''push'' pattern. 
Line 22: Line 24:
 git push        # send changes to a server (e.g. github) git push        # send changes to a server (e.g. github)
 </code> </code>
 +
 +<WRAP alert round>
 + **Don't give file paths to ''commit'' or ''push''**.
 +
 +Only the ''git add'' (or friends like ''git mv'' and ''git rm'') command takes file paths as arguments.
 +
 +''git commit'' and ''push'' work on the cumulative ''add''s to create a single snapshot, not individual files.
 +</WRAP>
  
 By default, ''git commit'' will open [[:tools:vim]] to use to write the commit message.  By default, ''git commit'' will open [[:tools:vim]] to use to write the commit message. 
Line 66: Line 76:
   * push ''q'' to quit   * push ''q'' to quit
  
-===== Github https push =====+===== Github setup ===== 
 +For ''git push'' to  github, you'll need some way to confirm your credentials. Authentication can happen with **ssh keys** or an **app password** 
 + 
 +==== Github https push ====
 To push to ''https'' (vs ssh like ''git@'') repos, you'll need to use a personal authentication token when prompted for a password. See [[https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens|github's documentation]] To push to ''https'' (vs ssh like ''git@'') repos, you'll need to use a personal authentication token when prompted for a password. See [[https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens|github's documentation]]
    
-===== ssh push =====+==== ssh push ====
 ''git push'' can use ssh authentication. You need a key likely in ''~/.ssh/id_rsa.pub''.  ''git push'' can use ssh authentication. You need a key likely in ''~/.ssh/id_rsa.pub''. 
  
  
 Contents of ''~/.ssh/id_rsa.pub'' should be pasted into ''new ssh key'' modal on https://github.com/settings/keys ((''top right user icon''->''settings''->''ssh and GPG keys'' -> ''new ssh key'')) Contents of ''~/.ssh/id_rsa.pub'' should be pasted into ''new ssh key'' modal on https://github.com/settings/keys ((''top right user icon''->''settings''->''ssh and GPG keys'' -> ''new ssh key''))
-{{:tools:pasted:20231024-130110.png}}+{{:tools:pasted:20231024-130110.png?300}}