linux:git

Differences

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

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
linux:git [2019/05/24 12:25] – created mhlinux:git [2019/05/28 16:01] – [Atom, Git and Rust] mh
Line 4: Line 4:
  
 I prefer using Graphic interfaces that help a lot with git management like in Atom, but here is a recap of basic commands so I remember them when I need. I prefer using Graphic interfaces that help a lot with git management like in Atom, but here is a recap of basic commands so I remember them when I need.
 +
 +[[https://githowto.com/|Git How-to]]
  
 ==== Stage / Commit / Push ==== ==== Stage / Commit / Push ====
  
 +<code>
 +git add the.file
 +git commit -m "The message"
 +git push
 +</code>
 +
 +
 +==== Atom, Git and Rust ====
 +
 +When you create a new Rust project using Cargo it automatically initializes a local git repository.
 +
 +To connect it with a remote repository follow the basic instructions :
 +
 +<code>
 +git remote add origin <remote_repo_url>
 +git push --all origin
 +</code>
 +
 +If you want to set all of your branches to automatically use this remote repo when you use git pull, add --set-upstream to the push:
 +
 +<code>
 +git push --all --set-upstream origin 
 +</code>
  
 +Atom has a built-in git feature that will automatically detect git repositories and has a useful GUI. To use it, your project root folder **must be directly** in the project tree manager. It cannot be in a sub-directory or Atom will **not** autodetect the git repository.
  • linux/git.txt
  • Last modified: 2020/06/01 16:35
  • by 127.0.0.1