Skip to content

Latest commit

 

History

History
113 lines (73 loc) · 2.59 KB

File metadata and controls

113 lines (73 loc) · 2.59 KB

Pushing RFDFWIM to GitHub

Use these steps to push this folder to the repository https://github.com/mklayek/RFDFWIM.


1. One-time setup

1.1 Install Git

If Git is not installed: https://git-scm.com/downloads

1.2 Open a terminal in the project folder

Example (PowerShell):

cd "e:\#[CWNU_backup\RFDFWIM"

Or use Git Bash or Command Prompt and cd to the same path.

1.3 Initialize Git (if the folder is not yet a repo)

git init

1.4 Add the GitHub remote

Replace mklayek or RFDFWIM if your repo URL is different:

git remote add origin https://github.com/mklayek/RFDFWIM.git

If origin already exists and points to the wrong URL:

git remote set-url origin https://github.com/mklayek/RFDFWIM.git

2. What gets committed

  • Included: All .m files, seismic.map, input/*.dat, README.md, MANUAL.md, COMMANDS.md, INSTALLATION.md, .gitignore, docs/, etc.
  • Ignored (by .gitignore): *.mat, output/, outputmyINV/, obs/, *.tiff, and other generated/large files.

So the repo stays small and code-focused. To also track generated data or figures, remove or comment out the corresponding lines in .gitignore.


3. First push (create main branch and push)

git add .
git status
git commit -m "Initial commit: RFDFWIM MATLAB code, docs, and input"
git branch -M main
git push -u origin main

If the repo already has a default branch (e.g. main), use that name. If GitHub uses master, run:

git branch -M master
git push -u origin master

4. If GitHub requires authentication

  • HTTPS: Git will ask for username and password. For GitHub, use a Personal Access Token instead of your account password:
    GitHub: Creating a personal access token

  • SSH: If you use SSH keys, set the remote to SSH and push:

    git remote set-url origin git@github.com:mklayek/RFDFWIM.git
    git push -u origin main

5. Later updates

After changing code or docs:

git add .
git status
git commit -m "Short description of changes"
git push

6. If the remote repo already has content

If https://github.com/mklayek/RFDFWIM already has commits (e.g. a README created on the web), do a pull first:

git pull origin main --allow-unrelated-histories

Resolve any conflicts, then:

git push -u origin main

Use master instead of main if that is the default branch.