Data Analyst and Technical Consultant

Using Git with Cmder

Adding a file to a new or existing repo using Cmder is quicker and easier than using the desktop app.  Here’s how to do it

Add a project

  • Create a new repo on Github.com
  • Under the repository name, click Clone or download
  • Copy the clone URL for the repository
  • Open Cmder and change the current working directory to your project
  • Clone the repo – git clone https://github.com/user-name/repo-name
  • Create the files in your new repo and stage them – git add .
  • Commit the files with a useful message –git commit -m "First commit"
  • Push to GitHub.com – git push origin master

 

Adding a file to a repo

  • Open Cmder and change the current working directory to your project
  • Stage the file – git add .
  • Commit the files with a useful message –git commit -m "Add new file
  • Push to GitHub.com –git push origin master