Monday, 17 August 2015

Edit an commit message in Github Repository - Commands

Question: How to change the Most recent commit message?
git commit --amend -m "This is updated commit message"


Question: How to change the Most recent commit message and append the files
git commit -a --amend -m "This is updated commit message"


How to display the status of files in the index versus the working directory?
git status; //;On branch test


How to create new Github directory?
git init <directory></directory>


How to get checkout from GitHub URL?
git clone /path/to/repository


Question: How to Add a files in github?
git add <files></files>


Question: How to commit the files in github?
git commit


Question: How to Push to a repository
git push origin


Question: HOw to git push in origin branch?
To push to your branch


Question: How to transfer all changes in your github?
git add file.txt
git commit  -m "We are add file.txt"
git push


Question: How to add file with commit message?
git add file.txt commit -m "We are add file.txt"


Question: How to pull all the changes ?
git pull origin