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 revisionBoth sides next revision
linux:git [2019/10/05 19:31] – [Atom, Git and Rust] mhlinux:git [2019/10/05 19:33] – [Atom, Git and Rust] mh
Line 30: Line 30:
  
 <code> <code>
 +cd existing_folder
 +git init //Skip if in a Rust project created with cargo, git is already initialized
 git remote add origin <remote_repo_url> git remote add origin <remote_repo_url>
-git push --all origin+git add . //Not sure it's required, since the folder is already populated. 
 +git commit -m "Initial commit" //Feel free to change the message 
 +git push -origin master //This is what actually pushes.
 </code> </code>
  
 You will be prompted for username and password of owner of the Git distant repository. You will be prompted for username and password of owner of the Git distant repository.
  
-Edit (Fall 2019) : This actually doesn't work very wellsee below for proper instructions.+Atom has a built-in git feature that will automatically detect git repositories and has a useful GUI. To use ityour 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 44: Line 48:
 </code> </code>
  
-This is the advised way to push to a new repo by Git Lab and works perfectly well with a Rust project. 
  
-<code> 
-cd existing_folder 
-git init //Skip if in a Rust project created with cargo, git is already initialized 
-git remote add origin [Remote Repository Address.git] 
-git add . //Not sure it's required, since the folder is already populated. 
-git commit -m "Initial commit" //Feel free to change the message 
-git push -u origin master //This is what actually pushes. 
-</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 ===== ===== Ressources =====
  
 [[https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control|Git book]] [[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