Skip to content
Snippets Groups Projects
Unverified Commit 29544d07 authored by Maria Paula Caldas's avatar Maria Paula Caldas Committed by GitHub
Browse files

Replace shell command

parent fab4b213
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ more information on this command checkout the help documentation.
help shell
```
Basically, you can run any Git command from Stata by adding `shell` before it.
Basically, you can run any Git command from Stata by typing `shell` or `!` before it.
For example, to initialise a Git repository in the current working directory you
would have to run:
......@@ -33,7 +33,6 @@ You can then go on to create a `.gitignore`, stage files and commit changes.
- No automatic text complition with the `Tab` key, as you would in Git bash.
- No syntax highlighting.
- You have to type an extra word (although granted, you could create a program).
## Here are the steps I took to create this little example
......@@ -42,29 +41,29 @@ You can then go on to create a `.gitignore`, stage files and commit changes.
2. Initialise Git repository.
```
shell git init .
! git init .
```
3. Stage `README.md` and `.stpr` file and commit.
```
shell git add README.md git-with-stata.stpr
shell git commit -m "Initial commit :hatching_chick:"
! git add README.md git-with-stata.stpr
! git commit -m "Initial commit :hatching_chick:"
```
4. Create little do file and run.
5. Stage do file and figure and commit.
```
shell git add scatter*
shell git commit -m "Add a little example script and figure"
! git add scatter*
! git commit -m "Add a little example script and figure"
```
6. Go to GitHub, create a repo with the same name, without initialising a README.
Then locally add origin and push.
```
shell git remote add origin https://github.com/mpaulacaldas/git-with-stata.git
shell git push --set-upstream origin master
! git remote add origin https://github.com/mpaulacaldas/git-with-stata.git
! git push --set-upstream origin master
```
7. Update `README.md`, stage, commit and push.
```
shell git add README.md
shell git commit -m "Update README"
shell git push
! git add README.md
! git commit -m "Update README"
! git push
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment