Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
linux:git [2019/05/28 16:01] – [Atom, Git and Rust] mh | linux:git [2019/10/16 20:58] – [Atom, Git and Rust] mh | ||
---|---|---|---|
Line 15: | Line 15: | ||
</ | </ | ||
+ | ==== Branches ==== | ||
+ | |||
+ | Switch branch (option create) | ||
+ | < | ||
+ | git checkout branch_name | ||
+ | git checkout -b create_branch_name | ||
+ | </ | ||
==== Atom, Git and Rust ==== | ==== Atom, Git and Rust ==== | ||
Line 23: | Line 30: | ||
< | < | ||
+ | cd existing_folder | ||
+ | git init //Skip if in a Rust project created with cargo, git is already initialized | ||
git remote add origin < | git remote add origin < | ||
- | git push --all origin | + | git add . // |
+ | git commit | ||
+ | git push -u origin | ||
</ | </ | ||
+ | |||
+ | You will be prompted for username and password of owner of the Git distant repository. | ||
+ | |||
+ | 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. | ||
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: | 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: | ||
Line 33: | Line 48: | ||
</ | </ | ||
- | 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:// |