Can anyone explain the git workflow?

0 votes
Feb 4 in Git & GitHub by anonymous
• 15,820 points

2 answers to this question.

0 votes

The basic Git workflow goes something like this:

  1. You modify files in your working tree.

  2. You selectively stage just those changes you want to be part of your next commit, which adds only those changes to the staging area.

  3. You do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory.

If a particular version of a file is in the Git directory, it’s considered committed. If it has been modified and was added to the staging area, it is staged. And if it was changed since it was checked out but has not been staged, it is modified.

answered Feb 4 by Jai
0 votes


The workflow of Git is described below

  1. First you have to initialize the folder for Git repo.

  2. After initializing create one file.

  3. Now you have to add this file in Git staging area. Here staging area works as a pointer which is used to track your folder.

  4. At the end you have to commit your file from staging area. 

Now, if you modified your file in future, then again you have to add at staging area and then commit it.

Thank You

answered Feb 4 by MD
• 55,020 points

Related Questions In Git & GitHub

0 votes
1 answer

Can anyone provide git realtime scenarios?

You work in a team. You are ...READ MORE

answered Feb 6 in Git & GitHub by Sirajul
• 57,870 points
0 votes
1 answer
0 votes
1 answer

How to solve the ‘Git commit -a error’?

This happens when no editor is set. ...READ MORE

answered Jul 5, 2018 in Git & GitHub by Tyrion anex
• 8,550 points
0 votes
1 answer

How to forcefully commit a file to Git even if the file is ruled as unchanged?

This is simple, just follow the below ...READ MORE

answered Jul 11, 2018 in Git & GitHub by Sophie may
• 10,100 points
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+2 votes
1 answer
0 votes
2 answers

How to view the nested workflow of a local git repository?

The closest way to view branches in ...READ MORE

answered Aug 2, 2019 in Git & GitHub by Sirajul
• 57,870 points
0 votes
3 answers

difference between git remote and git clone

HI.... GIT REMOTE add just creates an entry in ...READ MORE

answered Jul 10 in Git & GitHub by anonymous