Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 

Repository files navigation

sample-project

This is my first GitHub repository.
To clone the repo: 'git clone repoLink'
make the changes locally
once done, add the changes using 'git add fileName', or simply 'git add .'
once added, now commit the changes using 'git commit -m "Your Message Here"'
once committed, push the changes to the repo by executing 'git push origin main'
git push is a general command to push the changes. origin means the repo from where it has originally been cloned and main means the main branch
To used to initialize the git for a local repo, in other words to make a local repo a git repo, use 'git init'
So a typical git workflow would be as:

  1. Clone the repo
  2. Make the branch by executing "git checkout -b branchName"
  3. Make and add the changes
  4. Commit the changes
  5. push the changes by git push origin branchName

It will have the pull request created in github which you need to review later to merge it with the master/main branch.
git diff main is used to compare the changes of newBranch with the main branch
checkout to main branch and finally merge using git merge newBranchName followed by ''git push origin main'
>> To delete a branch, use 'git branch -d branchName'

Now after creating and merging pr, in order to fetch the changes locally in the main branch, we can use 'git pull origin main'

>Mohammad Anees Khan (Cryptlex)

About

This is my first GitHub repository.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages