linux:git

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
linux:git [2019/05/24 13:03] mhlinux:git [2019/09/22 20:37] mh
Line 11: Line 11:
 <code> <code>
 git add the.file git add the.file
 +git commit -m "The message"
 +git push
 +</code>
 +
 +==== Branches ====
 +
 +Switch branch (option create)
 +<code>
 +git checkout branch_name
 +git checkout -b create_branch_name
 +</code>
  
 ==== Atom, Git and Rust ==== ==== Atom, Git and Rust ====
  
-I need to write clear procedure on how to manage with the graphical interface git for rust projects. Cargo initializes rust as a local git repository, but linking it with a remote project, in GitLab for instance, does not automatically activate the graphical git interface in Atom. +When you create new Rust project using Cargo it automatically initializes a local git repository
-git commit -m "The message" + 
-git push+To connect it with a remote repository follow the basic instructions : 
 + 
 +<code> 
 +git remote add origin <remote_repo_url> 
 +git push --all origin
 </code> </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.
 +
 +===== Ressources =====
 +
 +[[https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control|Git book]]
  • linux/git.txt
  • Last modified: 2020/06/01 16:35
  • by 127.0.0.1