Open Git Bash.
git config --global user.name "Your Name"
git config --global user.email name@yourdomain.com
This step is important since the above details
will appear when you commit modifications in the repository. In this way your
collaborators will know who has updated the repository content.
Initialize a new GIT repository:
user@user:/GIT/test# git init
An empty Git repository is initialized: /GIT/test/.git
Create a file in the working folder:
You can check the status of files in the index
versus the working directory:
# On branch master # # Initial commit # #
Untracked files: # (use "git add <file>..." to include in what
will be committed) # # README nothing added to commit but untracked files
present (use "git add" to track)
Next, add the newly created file to the index:
Once again check the status of the files in the
index versus the working directory:
user@user:/GIT/test# git status # On branch
master # # Initial commit # # Changes to be committed: # (use "git rm
--cached <file>..." to unstage) # # new file:
README
Proceed with the first commit:
Check
the status after the commit operation:
Add the
remote repository to your existing local one:
Push the
modification to the remote repository:
You can log in your GitHub account and check
the newly pushed file:
No comments:
Post a Comment