Skip to content

sharris40/SDDTestRepository

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDDTestRepository

This repository is only a test. Use it for practicing.

Using This Repository

Note: Anywhere you see text in angled brackets , replace that text (and the angled brackets) with something appropriate.

  1. Navigate to a directory in which you would like to store repositories.

  2. Type the following command in the console:

    git clone [email protected]:sharris40/SDDTestRepository.git
    

    This will create a folder for the repository and copy all the files to it.

  3. Change to the repository.

  4. Configure your identity with the commands git config user.name "<your name>" and git config user.email "<[email protected]>". If you want your identity to apply to all repositories, add --global after git config.

  5. Create a branch with git branch <my_branch>. This is your local branch. You will make all changes in this branch.

  6. Switch to the branch with git checkout <my_branch>. You will need to type this whenever you want to make changes.

  7. Make any changes to the repository. Add, edit, and delete files just as you would any normal files.

  8. For any files you added, type git add <file_path>. You can add an entire directory by specifying the name of the directory as the file path.

  9. When you make a change, type git commit -a -m "<Comment>". Write a comment that describes your changes.

    The -a will cause git to detect any files you changed and removed, but it will not catch any new files. This is why git add is needed when you add a file. You should do this after every major change you make. If you do not want to commit an edited file, omit the -a, and manually add the files you do want to commit.

    Do not make multiple unrelated changes and commit them all at once; commit each change individually.

  10. When you have finished making changes, switch back to the main branch with the command git checkout master and update it with git pull.

  11. If Git reports that you are already up-to-date, you can merge the changes. Type git merge <my_branch>.

  12. If you received updated files, be careful; someone else made changes while you were working. Luckily, Git is smart about file changes and will usually merge the two versions together. However, there are some conflicts that can occur:

  • If two people edit the same line: git merge will report a merge conflict. The file will be changed so that it includes both versions of the changes with markers indicating the problematic lines. Edit the file to resolve the conflict, then add it using git add and commit the changes with git commit.
  • If one person edits a file, and another removes it: Decide whether to add or delete the file, and use git add or git rm followed by a commit.
GitHub provides some documentation on conflict resolution
[here](https://help.github.com/articles/resolving-a-merge-conflict-from-the-command-line/).
You should also look at the documentation for
[`git merge`](https://git-scm.com/docs/git-merge).
  1. When you have finished, upload the changes with git push.

Basic workflow

Initial setup:

git clone <repo name>​⇨cd <repo name>​⇨git config user.name "<your name>"​⇨git config user.email "<your e‑mail>"​⇨git branch <branch name>

Editing files

git checkout <branch name>​⇨ Make changes ⇨git add <new/changed file>​⇨git add <another new/changed file>​⇨ … ⇨git commit [-a] -m "<message>"​⇨ Make more changes ⇨ Make more commits ⇨ … ⇨git checkout master​⇨git pull​⇨git merge <branch name>​⇨ resolve conflicts ​⇨git add <file you fixed>​⇨git add <another file you fixed>​⇨ … ⇨git commit -m "<message explaining fixes>"​⇨git push

Markdown

This file is a special file for GitHub. Any directory containing a README.md will display some documentation in the GitHub Web page corresponding to the directory. If you want, practice writing README.md files. They’re written in a language called Markdown.

About

This repository is only a test. Use it for practicing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages