Skip to content

Imsatis/Git-Command

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GIt-Command

######Basic Commands of Git


BASIC CODES OF GIT BASH


#####To intiliaze the the Local Repo

1:) git init #to initialize the .git track folder or to start tracking


2:) git status #use to check the status of the current Branch.

3:) git add #is use for staging the files.

   #*Before commiting Staging is necessary*

4:) git add . #Staging all the file exist in Repo but only the Tracked files.

5:) git add *.extension #for particular file.

6:) git commit ('i' commit 'esc;wq') #use to commiting but it is complex.

7:) git commit -m'commit' #use to commiting and easyway.

8:) git log #To check the commit history.

9:) touch filename.extension #used to create a new file.

10:) touch .gitignore #for creating a ignor file.

11:) git branch BranchName #use to create a new branch of Repo.

12:) git checkout BranchName #use to change branch.

13:) git merge Branch/sourceName #use command in Destiny where to merge the Branch.

14:) git commit -a -m'commit' #use to skip the stageing step.

15:) git stash #unfinished changes that can be reapply any time.

16:) git stash apply #for applying the changes.

17:) git clone URL #use to cloneing the remote Repo in the local Repo.

18:) git remote #to check the remote repo in the local.

19:) git remote -v #use to check the URL.

20:) git fetch origin #use to fetch the data from Remote Repo But not merge it we have to merge manually.

21:) git pull origin #use to same as fetching the data and it merge the data automatically.

22:) git push origin master #use to pushing the data from local Repo to Remote Repo.

create a new repository on the command line echo "# Menu-Project" >> README.md git init git add README.md git commit -m "first commit" git remote add origin https://github.com/Imsatis/Menu-Project.git git push -u origin master

push an existing repository from the command line git remote add origin https://github.com/Imsatis/Menu-Project.git git push -u origin master

About

######Basic Commands of GIt

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published