DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Mastering Git
  • Terraform Best Practices: The 24 Practices You Should Adopt
  • How To Use Git Cherry-Pick to Apply Selected Commits
  • Top 20 Git Commands With Examples

Trending

  • Proactive Security in Distributed Systems: A Developer’s Approach
  • Is Big Data Dying?
  • How to Introduce a New API Quickly Using Micronaut
  • How to Convert XLS to XLSX in Java
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. How to Work With Git From Command Line (Windows)

How to Work With Git From Command Line (Windows)

Learn how to use the command line to work with Git in Windows.

By 
Mohamed Radwan user avatar
Mohamed Radwan
·
Oct. 22, 15 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
6.7K Views

Join the DZone community and get the full member experience.

Join For Free

It’s very important to know the commands behind the UI in Visual Studio, in this post I just explain the basic you need to work with Git from the command line.

The first step is to set the global settings, but first list display what its value is.

git config –global -l

If there is no settings it will tell you no such a file, if there is data it will be displayed as the following:
git config --global -l

If you open the user folder, you can see that file .getconfig, also if you open the Visual Studio and navigate to global settings you will find that this info has been set too.
.gitconfig

I can also edit this file using VIM:
git config --global -e

This will open Unix editor, to quite that window I need to type :q +enter.

You can press i to start entering text and save by pressing esc and :wq and enter, this will commit with the message you typed. In your current state, to just come out without committing, you can do :q
git config --global -e edit

If you open the file without a proper exit, it will create a swap file and you can’t open it again smoothly, you just need to delete that swap file or close the file as mention before

.gitconfig.swp

Navigate to the directory you want to use and type:
git init
git clone https://github.com/youraccount/rep

This will copy all files to your local files, try to add new file and then add it using git add

Try to see the status using git status

Commit the changes git commit -m ” your message”

Command (computing) Git

Published at DZone with permission of Mohamed Radwan, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Mastering Git
  • Terraform Best Practices: The 24 Practices You Should Adopt
  • How To Use Git Cherry-Pick to Apply Selected Commits
  • Top 20 Git Commands With Examples

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!