#git workflow
Explore tagged Tumblr posts
vivektech · 4 months ago
Text
Tumblr media
Use Git if: ✅ You need speed and distributed development ✅ You want better branching and merging ✅ You work offline frequently
1 note · View note
mentalisttraceur-software · 2 years ago
Text
Today I improved "git-cotree --init" to handle several edge cases, primarily involving untracked and ignored files. Previously its support for untracked or ignored files was rather limited, covering only the most basic of cases.
But one big goal of git-cotree was to make switching from a normal clone to a nice multiple worktrees setup seamless, and this brings it a lot closer to that goal.
So I am now a lot more confident recommending git-cotree for others to use. I still don't know when I'll actually flesh out the README, but at least now the risk is a lot lower.
However, I'm not sure what happens if for example Git submodules or Git LFS are in the picture. But odds are now good that any remaining issues are due to limitations in how multiple Git worktrees interact with some other Git feature rather than the fault of git-cotree specifically.
2 notes · View notes
intelliatech · 1 year ago
Text
Top 10 ChatGPT Prompts For Software Developers
Tumblr media
ChatGPT can do a lot more than just code creation and this blog post is going to be all about that. We have curated a list of ChatGPT prompts that will help software developers with their everyday tasks. ChatGPT can respond to questions and can compose codes making it a very helpful tool for software engineers.
While this AI tool can help developers with the entire SDLC (Software Development Lifecycle), it is important to understand how to use the prompts effectively for different needs.
Prompt engineering gives users accurate results. Since ChatGPT accepts prompts, we receive more precise answers. But a lot depends on how these prompts are formulated. 
To Get The Best Out Of ChatGPT, Your Prompts Should Be:
Clear and well-defined. The more detailed your prompts, the better suggestions you will receive from ChatGPT.
Specify the functionality and programming language. Not specifying what you exactly need might not give you the desired results.
Phrase your prompts in a natural language, as if asking someone for help. This will make ChatGPT understand your problem better and give more relevant outputs.
Avoid unnecessary information and ambiguity. Keep it not only to the point but also inclusive of all important details.
Top ChatGPT Prompts For Software Developers
Let’s quickly have a look at some of the best ChatGPT prompts to assist you with various stages of your Software development lifecycle.
1. For Practicing SQL Commands;
Tumblr media
2. For Becoming A Programming Language Interpreter;
Tumblr media
3. For Creating Regular Expressions Since They Help In Managing, Locating, And Matching Text.
Tumblr media
4. For Generating Architectural Diagrams For Your Software Requirements.
Prompt Examples: I want you to act as a Graphviz DOT generator, an expert to create meaningful diagrams. The diagram should have at least n nodes (I specify n in my input by writing [n], 10 being the default value) and to be an accurate and complex representation of the given input. Each node is indexed by a number to reduce the size of the output, should not include any styling, and with layout=neato, overlap=false, node [shape=rectangle] as parameters. The code should be valid, bugless and returned on a single line, without any explanation. Provide a clear and organized diagram, the relationships between the nodes have to make sense for an expert of that input. My first diagram is: “The water cycle [8]”.  
Tumblr media
5. For Solving Git Problems And Getting Guidance On Overcoming Them.
Prompt Examples: “Explain how to resolve this Git merge conflict: [conflict details].” 6. For Code generation- ChatGPT can help generate a code based on descriptions given by you. It can write pieces of codes based on the requirements given in the input. Prompt Examples: -Write a program/function to {explain functionality} in {programming language} -Create a code snippet for checking if a file exists in Python. -Create a function that merges two lists into a dictionary in JavaScript.  
7. For Code Review And Debugging: ChatGPT Can Review Your Code Snippet And Also Share Bugs.
Prompt Examples: -Here’s a C# code snippet. The function is supposed to return the maximum value from the given list, but it’s not returning the expected output. Can you identify the problem? [Enter your code here] -Can you help me debug this error message from my C# program: [error message] -Help me debug this Python script that processes a list of objects and suggests possible fixes. [Enter your code here]
8. For Knowing The Coding Best Practices And Principles: It Is Very Important To Be Updated With Industry’s Best Practices In Coding. This Helps To Maintain The Codebase When The Organization Grows.
Prompt Examples: -What are some common mistakes to avoid when writing code? -What are the best practices for security testing? -Show me best practices for writing {concept or function} in {programming language}.  
9. For Code Optimization: ChatGPT Can Help Optimize The Code And Enhance Its Readability And Performance To Make It Look More Efficient.
Prompt Examples: -Optimize the following {programming language} code which {explain the functioning}: {code snippet} -Suggest improvements to optimize this C# function: [code snippet] -What are some strategies for reducing memory usage and optimizing data structures? 
10. For Creating Boilerplate Code: ChatGPT Can Help In Boilerplate Code Generation.
Prompt Examples: -Create a basic Java Spring Boot application boilerplate code. -Create a basic Python class boilerplate code
11. For Bug Fixes: Using ChatGPT Helps Fixing The Bugs Thus Saving A Large Chunk Of Time In Software Development And Also Increasing Productivity.
Prompt Examples: -How do I fix the following {programming language} code which {explain the functioning}? {code snippet} -Can you generate a bug report? -Find bugs in the following JavaScript code: (enter code)  
12. Code Refactoring- ChatGPt Can Refactor The Code And Reduce Errors To Enhance Code Efficiency, Thus Making It Easier To Modify In The Future.
Prompt Examples –What are some techniques for refactoring code to improve code reuse and promote the use of design patterns? -I have duplicate code in my project. How can I refactor it to eliminate redundancy?  
13. For Choosing Deployment Strategies- ChatGPT Can Suggest Deployment Strategies Best Suited For A Particular Project And To Ensure That It Runs Smoothly.
Prompt Examples -What are the best deployment strategies for this software project? {explain the project} -What are the best practices for version control and release management?  
14. For Creating Unit Tests- ChatGPT Can Write Test Cases For You
Prompt Examples: -How does test-driven development help improve code quality? -What are some best practices for implementing test-driven development in a project? These were some prompt examples for you that we sourced on the basis of different requirements a developer can have. So whether you have to generate a code or understand a concept, ChatGPT can really make a developer’s life by doing a lot of tasks. However, it certainly comes with its own set of challenges and cannot always be completely correct. So it is advisable to cross-check the responses. Hope this helps. Visit us- Intelliatech
0 notes
serinemisc · 3 months ago
Text
So I came across this recently.
It's funny, because I think I exactly half agree with it. I do rebase-heavy workflows in Git mostly because every single Git client makes merge-based workflows ugly and hard to use. If GitHub simply displayed merges the way it displayed squash-merges, that would eliminate so much of the need for squash-merges.
But I don't think this covers everything. So let me go through every use-case for rebase separately:
git merge --squash
The squash-merge is one of the most popular ways to merge pull requests on GitHub, and it's an abject failure of the Git ecosystem that it's so popular.
When you do a regular merge on a pull request, you are essentially taking a bundle of commits from somewhere else, and putting it on top of your own main branch. It's an extremely linear thing to do.
But if you do that, GitHub's commit log just gets a bunch of commits interspersed throughout, with zero indication where they're from. And the nicer clients, if they do, visualize it as a tree (pronounced "DAG") (pronounced "a huge tangle of curvy lines"):
Tumblr media
This pic is from an article telling you to rebase, and, like, sure, rebasing sure is one way to work around a UI that displays your merges as a huge tangle. But Fossil makes a really good point. Why not instead display your merges as, like, not a huge tangle? git log --first-parent does this (and that's clearly an option in that Git UI), but it should be the default everywhere. And even when expanding the "bundle", the bundled commits should still be grouped together, not interspersed with other commits at essentially random.
The other issue is that, when showing the "tangle of commits", the reason it's so tangled is because it's showing the commits in chronological order of when the commits were made. Which is a completely useless sort order, compared to, say, chronological order of when they arrived in the current branch (i.e. grouping the merged-in commits together). This is why GitHub's rebase-merge is also such a popular alternative to merges.
git pull --rebase
Okay, so. Now you've fixed commit log visualization of merged pull requests. But that's not the only use of rebase! Here's another one: if you're working on some code, and constantly keeping it synced with remote, you'll generate tons of merges that are complete useless noise. Unlike a merged PR, these should ideally be hidden completely, or at least nearly-completely.
Anti-rebase people say that these merges serve the functionality of, like, preserving history. You made one commit when the remote was in this state, and another commit when the remote was in that state, and this is sometimes important history to preserve.
I think they are way overestimating how important that history is (judging by how many people use pull-rebase). I'm fine preserving that history if you can declutter the UIs, but it does require your UI to be able to distinguish between "important" merges (of new features from feature branches) and "unimportant" merges (keeping branches in sync with remotes).
The linked post doesn't talk about this problem at all, so I don't know how well Fossil handles this.
git commit --fixup
That leaves the amend/fixup commit. The link does mention that Fossil supports editing past metadata (e.g. commit message). But sometimes you want to edit the actual changes of a commit.
Now, for a sufficiently published commit, this is a bad idea. But if you have a habit of "commit early, commit often", having 50 bugfix commits makes a commit log really cluttered.
I frequently, like, have to weigh stuff like "is it worth cluttering the commit log to fix one typo in one comment?" for old code. And it would really suck to also have to do that for unpublished code, instead of going in with my trusty rebase scalpel.
git that's all I wanted to say
In conclusion. git rebase is a solution to a number of things that could also be viewed as UI problems, and fixed in other, better ways, and Fossil sure sounds like it's fixed some of them. But some of those UI problems are legitimately hard, and I'm not convinced Fossil fixes all of them, and GitHub extremely has not, so I'm gonna keep rebasing.
41 notes · View notes
parisoonic · 2 years ago
Note
Your posts about the technical aspects of art is very interesting! Love to read your little notes in your sketches and wips
Coming to your blog is like going to a gold mine for heavy medic stuff, its fantastic
Hope you have a good time :]
Thank you!!! It's really nice to hear people like seeing the 'behind the scenes' of some of my doodles. I'm fascinated by other peoples process and thoughts patterns My job often involves training artists up onto new show styles so I won't lie, I'm currently creating tutorials for here that will form a personal resource library and then will get retooled onto actual shows + show bibles. If you have a background or layout supervisor show you heavymedic to demostrate a photoshop shortcut...you'll know who it is lmao
I'm quite analytical about my own work - I find it's a workflow that helps me 'git gud' quickly as I'm not a massive drawer. This was an analysis I did that I never 'fufilled' (ie: do a corrected drawing) that I had laying around.
Tumblr media
Glad you like the heavymedic - I like them too! :)) Lots more on the way!
387 notes · View notes
blubberquark · 1 year ago
Text
Looking for Group
Somebody posted on Discord
Does anybody want to collaborate on a [game] project?
but nobody answered.
Nobody said yes. Nobody said no. Nobody even asked follow-up questions. And yet, people in that server really do want to collaborate on games and projects. What happened?
Obviously nothing happened because the asker did not specify anything. What kind of project? With who? For how long? What should I bring to the table if we collaborate? I don't know. I was busy anyway. Maybe I can set up the asker with other people, who weren't busy. But this is not an isolated incident. Every day, thousands of people ask in chat rooms, forums, and mailing lists "Does anybody want to collaborate?"
Answering with yes is a risky move. Imagine being on the other side, and somebody asks an open-ended question... Imagine being on the other side of "I am having a software problem, can anybody DM me?"
Nobody wants to be on the hook to be somebody's personal tech support without at least knowing the kind of problem, and nobody wants to commit, even tentatively, to a creative project. It's kind of a red flag. What can you do to allow others to message you, to just tentatively get you to agree, to just agree to ask you for more details of your project? What should you do so people who say yes don't feel like they are wasting their own time, and yours?
1. Scope
The most important thing to communicate is scope. It's less important what kind of creative project it is, but how big. Is it an ongoing side project? A weekend? A couple of hours a week for a couple of months?
There is a world of difference between "Does anybody want to collaborate on a weekend project?" and "Does anybody want to collaborate on an epic story with 20 characters, multiple storylines, lore, 50 hours of side quests, and 800 pieces of unique loot?"
2. Stakes and Commitments
The next most important thing is commitments. This is doubly important if you are working with friends. Sometimes you want to collaborate on Ludum Dare, and if your partner is busy on that weekend, you'd rather know now. Sometimes you want to submit a demo of your game to some kind of competition or showcase, and it has to be ready at a certain point.
Sometimes you are really putting your heart and souls into a project, and your friend is just in it "for fun" and thinks you are ruining his fun by taking the project seriously. Your "One Story You Had Inside Yourself" can be your friend's "Learn C++ in 21 Days". Your "ticket into the glamorous games industry" can be your friend's "goof off with blender for a couple of hours and then try a different hobby".
It's important to talk out stakes and commitments with your friends, because you might be able to rope in a friend into a project without doing this. You could rope a friend into your project and he starts resenting you a bit because you are gung-ho about art, and your friend just wants to spend time with you, and you are exacting and controlling and ask him to revise the dialogue/animations/3D models he contributed.
If you are talking to strangers, you can't rope them in. They just won't agree to work with you without details.
3. Skills
If you are asking for collaborators in a programming discord, chances are you will get replies from other programmers. Chances are, wherever you ask, your post will be seen by many people who are good at the things you yourself are already good at. Are you a programmer looking for programmers, or a programmer looking for level designers and artists?
There are many reasons for three programmers or three pixel artists to work together, but by and large, you need people who complement your skill set, but fit into your work flow. If you are working with Unity3D, you probably want to work with 3D artists who have rudimentary knowledge of git and C#, even if they aren't supposed to code, and you need rudimentary knowledge of their modelling software and workflows.
So when looking for people to work with, you need to tell them what you can do, what you can't do, what you want them to do, and how you want to work together.
4. Topic/Idea/Design/Genre
This is point #4. This is deliberate.
You could probably take the previous 3 points and cobble together a "looking for group" post. People rarely do that. They usually have an idea they want to realise. Ideas are a dime a dozen though, and you can still pivot later, after you have found your group members.
It can't hurt to include this. What kind of project do you have in mind?
5. Management and Art Direction
There is one more big thing to consider: If you already have a project in mind, you are taking control of the project. You are the boss, you decide that you are looking for four people to collaborate on a science-based dragon breeding MMORPG, any four people who sign up know what they are getting into. It makes sense that the topic is not open for discussion. It also makes sense that you are the project manager, because you made a list of skills and work that needs to be done, and you have worked all this out already.
We are looping back to point #2 here. Why should people commit to your project if you are holding the reins? What do they get out of it?
You should communicate as early as possible what the creative freedoms are, what kind of tone you want to pursue, and how free your fellow artists are to express themselves.
In a commercial project, you can have control because you pay people. If you are doing a game jam project, or just any unpaid hobby collaboration, you should consider giving the others some creative freedom.
In a game jam, you could just decide that somebody else gets the creative control when you pivot to a different idea. In a large, commercial project, it makes sense to delineate how much creative freedom an individual artist has. In an open-source project, the maintainer can just review a patch and decide not to use it.
Ideally, you should communicate early on how weird or wacky you want the result to be, whether you want something with broad commercial appeal, with a sombre and serious tone, or if anything goes. That would be a bit much for the initial post, so just give a hint whether this would be a good project for somebody who really wants to put pigs and frogs in every game, or a good project who wants to make a character based on her ex boyfriend that the player can shoot in the groin. Sometimes people have the most specific ideas...
If on the other hand you have no idea what kind of creative direction you want to go, maybe you shouldn't go this route at all. If you want to give creative control to a yet to be determined team member, why not join another team instead? If you don't know where the project is going, you can't really plan who and what skills you need anyway.
Examples:
A good request for a collaoration reads a bit like a dating profile or a job ad. It covers the five points mentioned above.
Hey, I am Robert, art director and senior gameplay programmer at Blubberquark Software. I am fluent (among other languages) in Python, C#, Lua, and Haxe. I would like to join a team working with Unity3D, libGDX, löve or Flixel for the upcoming Ludum Dare game jam, in the Hamburg area. I like to use Blender, Gimp, Wings3D, ASEPrite, TrenchBroom, LDtk, Tiled, Ogmo, or Crocotile 3D. I also learned some 3DS Max and Cinema4D in university, but I don't have a license for those.
Here's a fictionalised version of myself, looking for a game jam team. To be clear, I am not looking for a team, but if I was, I'd make sure I don't need to learn a new set of tools for a weekend game jam. I'd try to make sure we all know how to use the engine, and we all know how to use the same source control, and we can all build and run a project before the jam starts. I wouldn't want to do a Ludum Dare remotely, so all this goes in there.
Since this is about Ludum Dare, scope and stakes are clear, and the skills I would use are in there. Skills that are irrelevant to Ludum Dare are not mentioned. Topic and creative control will depend on the jam theme, which is TBD.
Hello, we are Jim (programming) and Julius (level design, turn-based games expert). We are working on a fantasy JRPG called "animecha generica" that we hope to sell on Steam. We already have a gameplay prototype with placeholder characters and pixel art, but we would like to work with a skilled artist to create more interesting character designs and expressive/emotive portraits for the conversation system. If you join us, you would create characters, character portraits, quest lines, and dialogue, and we would split the revenue thee ways. We are also looking for a musician (work for hire basis).
This sounds like an early-stage commercial project. There is an engine and a prototype, but the design seems to depend on the content, and the developers are looking for somebody who can contribute the content. The scope sounds rather large (probably at least 5 hours of gameplay, maybe more) and the time commitment would be full-time until release. The artist they are looking for would do a little bit of everything, from art direction and narrative design down to art assets, and there would probably be a lot of overlap between the roles of two developers and the artist. Everybody wears multiple hats.
This sounds really risky, and the success of the project would depend on none of the three developers screwing it up.
Hi, I am Takeshi Kovacs, and I am making a new game engine based on Vulkan rendering, with its on scripting language, but optionally scripted in Python or C#. If this sounds interesting to you, I would like to work with you on a small game project of your choice, and help you realise your game design to test the viability of my Vladimir-and-Estragon Engine. Pick any weekend game jam of your choice. Pacific Time Zone only.
This seems low-pressure, and of limited scope. It could be a good after hours project, but it's probably not necessarily a good fit for a beginning programmer. You'd learn a new and unproven engine and scripting language. Apart from wasted time, it can't hurt that much to try. If you are a beginner, you could try to implement Pong or Tetris with Takeshi's help.
If you take up this offer, you would enjoy significant creative control, but the main objective would not be to produce a game for people to enjoy, but example code, or a game mechanics as a proof of concept for the engine.
We are making an open source shmup written in libGDX. We are always looking for new contributors. We have 100 stars on GitHub, and 50 players, according to our analytics. For the next release, we would like to add new levels, new power-ups, more ships, more content. Play our game [here] or build it from source by [following] [these] [instructions] [(Outdated Wiki Page For Ubuntu 20.04)]. If you have experience with Steam Workshop, talk to us on [our Discord].
This project has a medium scope, semi-mature code base, and low time commitment. You could probably contribute some content, or a patch to the engine, and nobody would really rely in you to stick around. On the other hand, you have little influence on the overall game design. You could certainly try: You could make a pull request that completely re-vamps the gameplay, but at that point, you might as well start a hostile fork.
We at secret studio are making otome dating simulator. Want to have demo ready for PAX Moonbase. We are looking for multiple character artists who can draw our characters on-model on a work-for-hire basis, and two additional writers for our writing team. We are looking for candidates who have experience with authoring systems like twine, ink, Ren'Py, Visual Novel Maker, or RPG Maker. Experience with YarnSpinner is a plus, but not required. You have the opportunity to design your own otome love interests and story lines. You will be expected to work under our creative director.
Like the JRPG example above, this is a commercial project with a large scope and fixed design, but these people are looking to hire more people who wear fewer hats each to create content quickly. This looks like a job ad for a paid position. It should be! You would have some creative freedom, but since this is a commercial project, you will have to stick with the marketing demographics and write romance storylines for girls who like boys, and any ideas you want to convey have to fit into that framework. It looks like they are using YarnSpinner and an undisclosed game engine, and they are willing to teach you how to use their tools on the job, but they seems to expect a writing background, and some prior experience in the tools/workflow/production side of visual novels specifically.
Hi. My name is Jeff. I work in theatre and I produce radio plays. I have podcasting and sound recording equipment at work. I play the guitar, badly, and I can borrow an old Moog synthesiser. I want to collaborate on a game project, by producing foley sound effects, or recording short stings and jingles. I know some QBasic from back in the day, but I haven't programmed much since then. I have licenses for Ableton, Photoshop, and Autodesk Maya.
Jeff is looking for a group. Jeff is not looking for a big commitment. He is willing to help a project out. Jeff has listed some skills and things he could contribute to a project. He is not looking for a new full-time job, but maybe a paid side gig.
Hi. I am Raven Siege Tank Banshee Medivac, a sophomore student majoring in computer science and underwater basket weaving at New England University, Arkham. I can use Blender, Photoshop, and and Logic Pro. I would like to help out with an open-source game project. I would also consider doing a puzzle platformer together. I know some PyGame.
There is almost but not quite enough to go on in this one. In what capacity would Raven work in a collaboration? What kind of scope is right, here? Maybe Raven would like to work on that shmup written in Java, but as far as the puzzle platformer is concerned, we don't know why Raven can't just make it solo with PyGame and Photoshop.
TL;DR
If you want to find people to work together with, you must communicate scope, commitments, and skills you need and skills you bring to the table. Explaining what kind of idea you want realised is also important, as is creative direction, but not as important as the first three. Your post should look like a job ad. Read your post and think if you would join that project or ask that person to join yours.
37 notes · View notes
moral-autism · 3 months ago
Text
using git and a … wikipedia says that the generic term for what github and gitlab are is 'software forge' for document editing is pretty great
you can use your favorite text editor! you can track a multi-file project! the default workflow encourages you to keep copies both on your computer and in the cloud! you can log what changes you're making!
if you accidentally edit with the wrong account you can go edit the history, it'll be a pain but you can.
the other options for "edit a document and show it to your friends as you edit" are, like:
google docs. it's a weird proprietary format and if you export to html it will be a horrible mess of html that needs cleanup. you don't by default end up with your file constantly up to date on your computer. it's super easy to end up viewing a doc with the wrong account.
edit in some platform on your computer and upload files to share them with your friends. you will have to upload the files a lot to lots of people if you want to keep them all up to date.
use some weird other web text service. it might also randomly go down and delete everything and there's way less of a robust advice ecosystem
unfortunately if you use a software forge they might ask you if you want to add a kubernetes cluster. and also they often won't enable word wrap on plaintext.
(im currently writing stuff on gitgud.io which has a fairly lenient ToS)
7 notes · View notes
izicodes · 2 years ago
Text
My progress so far in the Computer Science path certification!
Tumblr media
Wednesday 4th October 2023
Though I am only 20% done, I am 20% done! The main focus of the first 20% is Python and learning the basics like:
Lists
Dictionaries
Loops
Working with files like .csv and .txt
Basic Git workflow
And I am working on it now! The next update would around 40% to see what new things I'll learn~!
Tumblr media
⤷ ○ ♡ my shop ○ my twt ○ my youtube ○ pinned post ○ blog's navigation ♡ ○
90 notes · View notes
sunny-in-gotham · 1 month ago
Text
A free image hosting solution for AO3 and elsewhere - A Tutorial (mobile-friendly!)
See the demo site made from this template IN ACTION: https://hotlink-archive-template.pages.dev/
This guide is for an easy, mobile-friendly way to host files for hotlinking on AO3 or elsewhere, using github and cloudflare pages.
I've encountered far too many dead links in fanfics and forums simply because a hosting service decided to dump older files, or they decided to change their TOS to no longer allow hotlinking or certain kinds of content (nsfw, fictional graphic content). See Optional Steps for even more options.
This is an easy, barebones way to permanently host images that you don't want deleted unexpectedly or that you can't host elsewhere. (Emphasis on barebones. This will not be a nice portfolio style site. Unless you decide to code that yourself!) You can follow the link above for an example of this type of site.
It is also EASY to upload and use on mobile devices after initial setup!
Tools you will need:
Cloudflare Pages/Workers is a free to use static site hosting service. This will publish your files and make them available online. This will publish your files and make them available online. There is a limit to the amount of data you can upload for free, but you can pay for proper hosting if you want to exceed it.
Github is a code sharing/storage platform. Your files will go here first before being published on Pages. You can edit and upload files through your browser at github.com, or through Github Desktop, a program you install on your computer. There are limits to Github repositories, but they are also generous (suggested 1GB to 5GB per repo).
Basic Setup
1. Create a github account
2. Copy this template repository hotlink-archive-template
Your website will be contained in a repository, a place where all the files and the revision history for your project are stored.
This template repository uses an "Action" (using python) to automatically create a "home" page with an Index of all the files in your repository every time it is updated.
NOTE: I recommend you set your repository to Private. Github's history feature is extensive, so if you have sensitive content or think you might want to delete something later, it will be hard to get rid of it completely once it's been committed and publicly available.
3. Enable Action permissions
In order for the Action script to work, you need to give Actions permission to read and write in your repository.
Within your repository, go to the tab Settings > Actions > General > Workflow Permissions
Tumblr media
4. Create a Cloudflare account
5. Create a Pages (or Workers) project and link it to your Github repository
Your Pages project will create the front end of the site where the images will be displayed. You will be able to link those images to other platforms like AO3.
You can create either a Workers or Pages project by going to Add > Pages (or Workers). Name your project WISELY! This name will be your site's URL.
Workers vs. Pages
Workers is subsuming Pages on Cloudflare and now has all the same static hosting capabilities, in addition to its original server-side processing services. If you'd like to, read more about this.
While Workers has similar capabilities, I recommend Pages for this project. Pages has the added bonus of a cleaner URL if you do not have your own domain: “MySite.pages.dev” in Pages vs Workers' “MySite.username.workers.dev”
You will be prompted to import an existing Git repository. You will need to give it access to your Github to do this.
Tumblr media
Select the repository on your Github you made for your project, then hit "Begin Setup".
Name your project WISELY! This name will be your site's URL.
You do not need to change any settings on the next page, so hit "Save and Deploy". Your image hosting site will now be live!
The URL will be "https://ProjectName.pages.dev". It may take a few minutes to become accessible.
Now you're done with the basic setup!
How to Add files
You can add any files you want to link to on AO3/elsewhere through mobile, desktop browser, or the Github desktop program!
Here is how to do it on Github.com:
Open up the repository that you made (it can be found at github.com/username/repositoryname). You will see a list of folders and files that are in that repository.
Click into the folder "fan-stuff".
In the top right, go Add file > Upload files and drag in the images you want added. You will need to name the images BEFORE you upload them, as there is not an easy renaming feature within Github's browser interface.
In the Commit changes box, choose a title for what action you are doing. This will help you backtrack uploads if needed.
For example, it could be "Uploaded Batman Art". Make sure it's set to "commit directly to the main branch", then commit those changes. This will upload the files.
Now, if you visit your site, you will see your uploaded image under the "fan-stuff" folder!
To embed/link your image, navigate to your file on your Pages site and copy the URL in the address bar. This URL is what you will use to embed your photo (using HTML or "add image as URL" tools some sites have).
Continue onto More Setup to customize your site and implement more advanced settings. See Tips/Troubleshooting if you're running into problems.
More Setup
Perform site customization/advanced setup with Github Desktop on your PC
Github’s web UI is great, but it has major limitations. I highly recommend that you use Github Desktop during the initial setup, as well as when you want to make major organizational changes to your files/site. Once you have everything set, though, you can use Github in your browser to upload whatever files you want to hotlink at the moment.
Download Github Desktop and “clone” (download a copy of) the repository you made.
This is the best time to rename/rearrange folders + files, etc.
There are other methods in the Troubleshooting section if you need, but Github Desktop is by far the easiest way
see Adding/Renaming Folders for important info on how to properly rename/add folders
see About the Index Page for how to customize your Index pages
Once you’re done editing, “push” (upload) all the changes you made to your online Github repository.
Having some sort of text editor like Notepad++ is useful for editing any code, the automatic color-coding is very helpful. You can edit in plain old Notepad as well, it just won’t look as nice.
About the Index Page
The template repository uses a python Action to automatically create an HTML "home" page with an Index of ALL the files in the folder every time it is updated.
This is particularly convenient for mobile use, as you can upload a file, and the python action automatically updates the Index page.
If you don’t want this, just disable the “create-index” Action and delete the .py files. You can just type in the file locations to get to each file, or you can manually maintain an home/Index page yourself, which isn't hard if you know some basic HTML and can remember to do it consistently.
Also note that if you wish to change any of the content on your Index pages, you must edit the "index.py" file, not the "index.html" file. The "index.html" file gets re-written every time the "create-index" Action is run in order to keep the file index up to date.
Adding/Renaming/Deleting Folders
Disclaimer: This is a bit convoluted because I am extremely unqualified to be working with python OR HTML. There’s probably an easy way to do this, but I don’t have the skill to do it, and most of the stuff here is copied from stuff I found around. If you know a better way to do things, please let me know, it’d make my life easier too!
Adding or renaming folders involves some extra steps.
1. The "index.py" file inside the folder needs to be edited to match the parent folder name.
The place you need to do this is found near the top of the file (highlighted below)
Tumblr media
2. Then the outer-most "create-index.py" file needs to be updated to match the new name as well. If you’ve added a new folder, duplicate and adjust the code to match.
The place you need to do this is found at the bottom (highlighted below)
Tumblr media
If you don’t need any folders at all, great! Just delete them and their contents! No need to edit any files. (Don’t delete “index.html” or “create-index.py” or “.github/workflows”!)
If you would like to have these folders for later use, leave them as-is and simply edit the index files.
The relevant lines of code at the bottom of "create-index.py" like in the previous step for renaming folders. You may delete this code, or comment it out (using # at the beginning of a line will make it “invisible” to the computer)
Then, add the folder’s name to the “exclusions” list at the top of the "create-index.py" file so that it doesn’t show up on your Index page (highlighted below)
Tumblr media
You can also use this same concept to create "invisible" files/folders. Any files/folders included in the "exclusions" list in "(create-)index.py" will not be listed on the Index page, however they can still be found through the direct URL to the file.
On the flipside, this means simply hiding the file/folder from the Index page does not get rid of the file from your site. Anyone who has the URL will be able to find that file unless you remove it, or move its location to change the URL
Tips/Troubleshooting
(Re)name your files before uploading
It’s not possible to rename image/media files on Github’s web UI (it is possible with the local Git program). The "create-index" Action lists out the names of your files exactly, so you will end up with ugly strings of numbers and letters on your Index page if you don't rename them, which is terrible to look at and also plain old CONFUSING to navigate.
So if you're uploading on mobile or through Github on browser, name your files with easy to remember and distinctive filenames before you go ahead and upload them. This makes everything much easier, and it makes your Index page look nice :)
My website isn’t updating when I edit my Github repository!
Check to see if your Pages is retrieving from the correct branch, and if it has automatic deployments enabled.
Tumblr media
Can’t see your Github repository when trying to link it on Cloudflare?
Check your Github applications Repository Access settings. Go to your ACCOUNT Settings > Integrations - Applications > Cloudflare > Repository Access
Tumblr media
Index action is failing!
Go back to step 3 in Basic Setup and check if you’ve given Actions permission to read and write. If that’s not the issue, check to see if you’ve set up your "index.py" files correctly. The folder names should correspond to the parent folders, and the "create-index.py" file in the outer-most folder should have the correct folder names at the VERY BOTTOM.
How do I rename a folder (or move a file) in Github’s web UI?
It isn’t possible to directly rename a folder in Github’s web UI, doing it using Git on your computer is the most foolproof way to do it. But there is a way (except for media files).
Go into the folder you want to rename and select a file such as “index.html” and enter the “edit” mode.
Go to the file name and backspace until you can edit the parent folder name as well. This will create a new folder with the new name.
You’ll have to do this to every file in the folder until they’re all in the new folder.
Unfortunately, you can’t do this with media files like png/jpg/etc, because entering the “edit” mode on a photo “breaks” it somehow, and bye-bye image :’) (Don’t worry if this happens, just don’t commit the change or roll it back in your history).
Optional Steps
Make deployment (semi-)Manual
You can play with cloudflare and github to make deployment of your site a manual step you have to trigger, instead of automatic with each commit (default setting). This is a safeguard in case you accidentally make a change or delete something from your github, it won't affect your website.
Deploy w/ Branches
You could do a semi-automatic deployment with a "Production" branch on your github that is separate from the branch you edit. This creates an extra step before anything is published on Cloudflare. A safeguard against accidental changes/deletion of sorts :)
Tumblr media
Go to Settings > Build tab > Branch Control
Choose your Production Branch (MAIN or CLOUDFLARE) and enable (or disable) automatic deployments
If you choose MAIN, every change you commit to MAIN will be published to Pages
If you choose CLOUDFLARE, any changes you make to MAIN will not show up on your Pages site until you Pull from MAIN to CLOUDFLARE
To Pull changes from MAIN to CLOUDFLARE, go to your github repository
Above your files on the Left, you will see a toggle to choose which branch you are on.
Choose Cloudflare. There will be a message like "This branch is 7 commits ahead of, 2 commits behind main." Click "2 commits behind"
Click "Create a Pull Request". Then click "Merge Pull Request". If everything is correct, this should trigger a build on your Cloudflare
Deploy w/ Github Actions
Or you can create a manual command that you have to enter on github to trigger a deployment on cloudflare. If you're paranoid about anything happening to your site due to a mishap on the Github side, this is a safe choice. Unless you manually trigger the command, your Pages site will be completely untouched no matter if something happens to your repo.
This can be done in many ways, I think the most straightforward is with Deploy Hooks (maybe in conjunction with Actions if you want to make it mobile-friendly), and might be a bit complicated, but not too hard to figure out with some Google-fu.
Here’s some links I think will be useful (note: I don’t use this method, so these haven’t been tested)
Manual trigger action tutorial
How to configure Github webooks
Storing Locally instead of on Github
Although this guide is written with Cloudflare's Github integration in mind, particularly for easy online/mobile access, you can also keep your files locally on your PC and directly upload your assets onto your Pages project. This gives you full control over what happens to your files. (Keeping backups is a good idea. You can still use Github Desktop to do this, just keep your repository on your PC.)
Simply clone/download the repository as it is, customize it as you like, and create a NEW Pages project on Cloudflare, using "Direct Upload" to upload your files
Once you have connected a Pages project with Github, there is no way to change the deployment method to Direct Upload or vice versa. Direct Upload is also not available for Workers.
One thing that will NOT work the same is the "create-index" Action that only works on Github.
I have made a "create-index.exe" that will execute the "create-index.py" files in the exact same way as they would work with the Action. You do not have to install python for this to work (if I did everything right). Simply run "create-index.exe" whenever you make a change and want to update the "index.html" files
Remember, this is EXACTLY THE SAME as the "create-index" Action, meaning you have to edit each "index.py" file when you rename folders, add a folder, want to exclude a file from the Index page, etc. (See Adding/Renaming Folders for how to do this)
Find me on Bluesky. Or if you have a problem, open an Issue on this project :)
I'll try to answer your questions as best I can! But really, I am the most amateur of amateurs and figured this all out using Google, so I might not be of much help ^^;
I also recommend Squidge Images (an offshoot of Squidge.org) as a fairly trustworthy alternative. However, Squidge Images does have some additional rules that Squidge does not, and what crosses the line is at their discretion.
I also posted this over on AO3!
5 notes · View notes
kokoasci · 7 months ago
Note
Make a neocities, it is Very fun, I promise.
oh trust me ive looked into it :) im a spare time web dev/frontend engineer so it looked like a lot of fun but i dont like the IDE work sync method since it's a browser-based HTML editor, so i just got too lazy to actually code something and then merge all the files over 😭
i was thinking of trying it out though for a personal blog, but ive definitely spent too long on my 90s web styled portfolio website (professional for webdev and research stuff, not art haha) so im a little burnt out lmaooo
i do want to start a personal blog or even an interactive OC website using rlly cool jQuery functionality, etc. but ive just never gotten around to it :( if anything i'd probably opt for a github.io website since im comfortable with Git config and that kind of save workflow. thank you for the recommendation though! i will get around to it eventually 🤞
12 notes · View notes
moose-mousse · 2 years ago
Text
A beginners guide to GIT: Part 4 - How to use GIT as 1 person
Table of content: Part 1: What is GIT? Why should I care?
Part 2: Definitions of terms and concepts
Part 3: How to learn GIT after (or instead of ) this guide.
Part 4: How to use GIT as 1 person
Part 5: How to use GIT as a group.
When it comes to not getting in each other's way, working alone is the simplest (It has a lot of other drawbacks). This is the simplest way to use GIT. You can do it with an external repository as a backup or just locally on your computer. It depends on how important your project is. If your laptop crashes tomorrow, which projects would you have a really hard time losing? Better to have an external backup for that. Github is often used for this (Maybe less now that Github makes machine learning AI’s, and so ARE stealing your code to train their AI on.) but you can also use Bitbucket (Which... may also steal your code...) and there are many many others out there. GIT is often used in certain patterns, called “workflows”. These have you working in more or less rigid ways to make it simple to work together. But since you are working alone, you do not risk others changing your code while you are working, so you can do it the simplest way :D
I will be doing a step by step guide that you can follow along. I will be doing it on a completely empty project and making a tiiiiiny program in C. This is because it is super simple. You do NOT have to know C to follow. You can also follow the steps with your own already existing project.
I PROMISE you, GIT cannot hurt you. Worst case scenario is that you fiddle around and break the repository part. (Meaning the files in the .git folder). But your files will always be safe.
(If you do not have git installed, check out part 3 for that)
First, I make a folder, navigate my shell into it, and call git init:
Tumblr media
By the way, you can get used to GIT messages like this that tell you all your options, and explain what GIT has done for you. GIT is very good about giving you as much help and info as possible,
Now I will teach you the most important command in GIT.
It is more important than any other. Ready?
git status
Tumblr media
This makes GIT tell you what git thinks is happening right now. What issues there are and what files are tracked, untracked or have been changed. Use this command often, especially while you are new to GIT, run it after every other command. It is how you learn what GIT is doing and thinking :3
Since our repo is empty it tells you what branch you are on (master. The only branch we will need since we are working alone)
and that you have not made any commits.
It also tells you the commands git think you will want to use on files. Since our repository is empty, it tells us to create some files, and then how to add them :3 So let's do that:
I have added my tiny program, as you can see:
Tumblr media
Now let us see what GIT thinks we did:
Tumblr media
Now, since there have been changes, git shows us them.
Files can be untracked tracked and not changed (In which case, git status does not show them) tracked and changed.
Right now, main.c is untracket. Which basically means GIT have no idea about this file, other than it is in the folder.
Ok, let us commit(save) the file. GIT tells us this is done with git add <File> . So we will write git add main.c
Then we use git status again to see what happened git status
Tumblr media
And yeah, our file is now ready to be committed. So lets do it! git commit -m “My first commit!”
The “-m” option is to write the git update explanation directly in the console instead of using an external program to do it. Done You have now committed your code! It is now saved!
git status shows that everything in the working tree is as it was last time we committed (Duh. We JUST committed)
Tumblr media
I will now make some changes to the main file:
Tumblr media
Git status shows us main.c was changed...but what if we wanted to know what was changed in more detail? How will we get status to do that for us? Let us find out! git help status
git then shows the help page for status And there we can see this part:
Tumblr media
So if we write status with 2 -v arguments, we get all the details. Let us try:
Tumblr media
And look! It shows us EXACTLY what lines were changed! I stage the changes and commit:
Tumblr media
And you have now learning enough about GIT to use it.. You now have all your work saved, in different commits. If you ever want to know all the commits you have made, write git log:
Tumblr media
And if you want to know what a specific commit did, you copy the name of the commit, and write git show:
Tumblr media
Now, everytime you want to save your work, you
1: Write/change the files you want
2: Add the files you want as part of this commit
3: make the commit These three steps are your workflow.
If you have a remote repository, then you add them steps
4: push to remote repository
To do this step, you can actually just write
git push
If you have set up a remote repository, then it just works. If you have not, then git will tell you what to do Whichever remote repository you use will tell you if you need to do other steps, like setting up passwords or ssh keys. They will also tell you how to set up the remote repository (That is not a GIT thing, that is a bitbucket or a github thing, so refer to whichever of those sites you want to use) And that is all! Every time you commit, your project is saved (it is smart to commit often, but usually only commit when your project can be compiled.) And whether you use a remote repository or not, you now have a fully valid GIT repository, and all the git tricks can be used on your project!
39 notes · View notes
yasirinsights · 2 months ago
Text
GitHub and Git Commands: From Beginner to Advanced Level
Tumblr media
Git and GitHub are essential tools for every developer, whether you're just starting or deep into professional software development. In this blog, we'll break down what Git and GitHub are, why they matter, and walk you through the most essential commands, from beginner to advanced. This guide is tailored for learners who want to master version control and collaborate more effectively on projects.
GitHub and Git Commands
What Is Git?
Git is a distributed version control system created by Linus Torvalds. It allows you to track changes in your code, collaborate with others, and manage your project history.
What Is GitHub?
GitHub is a cloud-based platform built on Git. It allows developers to host repositories online, share code, contribute to open-source projects, and manage collaboration through pull requests, issues, and branches
Why Learn Git and GitHub?
Manage and track code changes efficiently
Collaborate with teams
Roll back to the previous versions of the code
Host and contribute to open-source projects
Improve workflow through automation and branching
Git Installation (Quick Start)
Before using Git commands, install Git from git-scm.com.
Check if Git is installed:
bash
git --version
Beginner-Level Git Commands
These commands are essential for every new user of Git:
1. git init
Initialises a new Git repository.
bash
git init
2. git clone
Clones an existing repository from GitHub.
bash
git clone https://github.com/user/repo.git
3. git status
Checks the current status of files (modified, staged, untracked).
bash
git status
4. git add
Stage changes for commit.
bash
git add filename # stage a specific file git add . # stage all changes
5. git commit
Records changes to the repository.
bash
git commit -m "Your commit message"
6. git push
Pushes changes to the remote repository.
bash
git push origin main # pushes to the main branch
7. git pull
Fetches and merges changes from the remote repository.
bash
git pull origin main
Intermediate Git Commands
Once you’re comfortable with the basics, start using these:
1. git branch
Lists, creates, or deletes branches.
bash
git branch # list branches git branch new-branch # create a new branch
2. git checkout
Switches branches or restores files.
bash
git checkout new-branch
3. git merge
Merges a branch into the current one.
bash
git merge feature-branch
4. git log
Shows the commit history.
bash
git log
5. .gitignore
Used to ignore specific files or folders in your project.
Example .gitignore file:
bash
node_modules/ .env *.log
Advanced Git Commands
Level up your Git skills with these powerful commands:
1. git stash
Temporarily shelves changes not ready for commit.
bash
git stash git stash apply
2. git rebase
Reapplies commits on top of another base tip.
bash
git checkout feature-branch git rebase main
3. git cherry-pick
Apply the changes introduced by an existing commit.
bash
git cherry-pick <commit-hash>
4. git revert
Reverts a commit by creating a new one.
bash
git revert <commit-hash>
5. git reset
Unstages or removes commits.
bash
git reset --soft HEAD~1 # keep changes git reset --hard HEAD~1 # remove changes
GitHub Tips for Projects
Use Readme.md to document your project
Leverage issues and pull requests for collaboration
Add contributors for team-based work
Use GitHub Actions to automate workflows
Final Thoughts
Mastering Git and GitHub is an investment in your future as a developer. Whether you're working on solo projects or collaborating in a team, these tools will save you time and help you maintain cleaner, safer code. Practice regularly and try contributing to open-source projects to strengthen your skills.
Read MORE: https://yasirinsights.com/github-and-git-commands/
2 notes · View notes
maplecinnamonbun · 11 months ago
Text
recently started using ‘alias go-go-gadget=git’ to spice up my workflow
9 notes · View notes
utopicwork · 10 months ago
Text
Tumblr media
ID: Flowchart titled Workflow that starts with a node that says "🔒 Admin Web UI" and connects to two nodes: the top says "🔒 Credentials Class Daisy" and the bottom says "🔒📄 Admin Dynamic Template"
Figured out a mind mapping technique that will work for me. In Obsidian I can create flowcharts relatively easily and since my process involves a lot of ideas happening simultaneously I can easily jot those down as branches to follow later.
This will give people a better idea of how I work and the overall status of the project at a glance. I intend to try and update this regularly and have it published on the site or git repository.
Most importantly though it will speed up coding and improve code quality since it will help with my memory
The Mermaid Markdown used to generate this is:
"""
---
title: Workflow
---
flowchart LR
AWUI["🔒 Admin Web UI"]
CCD["🔒 Credential Class Daisy"]
ADT["🔒 📄 Admin Dynamic Template"]
AWUI --> CCD
AWUI --> ADT
"""
6 notes · View notes
transienturl · 4 months ago
Text
this is, obviously, the kind of thing you ideally never use, and thus probably shouldn't really know?
however: I finally bothered to figure out how to use git rebase --onto to sync changes between multiple git branches that depend on one another.
normally, one runs git rebase [new base branch] to change the base of the the currently checked out branch to the target. typically this is git rebase main or git rebase master. there's a second argument that can go after the new base branch that defaults to the currently checked out branch; that argument makes following the documentation/examples I could find confusing and I always check out the branch I'm working on so I'm going to ignore it.
the --onto argument takes two inputs: the first is the same as the regular argument; the second is the last commit on the current checked out feature branch we want to drop because it is now obsolete.
I think the way git diagrams usually show branches is unhelpful here; here's mine. say I have this:
A---B---C---D feature1 A---B---C---D---E---F feature2
I realize that I have a bug in commit C in feature1, and the fix will merge conflict with D. I rewrite history on feature1 to fix it:
A---B---C*--D* feature1 A---B---C---D---E---F feature2
now I check out feature2, wanting to update it. I can't just do git rebase feature1, because git will try to make A---B---C*--D*--C---D---E---F. I can make a temporary branch based on feature1, cherry pick E and F onto it, then hard reset feature2 to the temporary branch, but that's silly. (I could probably do a number of other things; there are like eleven billion git commands. please comment if you know an even better way to do this.)
what I want to do here is git rebase --onto feature1 D (where D is the sha of commit D, the last commit I do not want to keep on feature2 because I am replacing it with the new base branch).
I have no idea why this command is not git rebase feature1 --onto D or something. replacing the first argument you would normally use with a flag and then the argument you would normally use and then another different argument makes precisely zero sense? but, whatever, fine. sure wasted me a lot of time in between the first time I read that manpage, gave up, did temporary branches for years, then finally figured it out, but you do you, git devs.
edit: oh, this probably goes without saying if you know enough git to read this, but this is only necessary if one does rewrite history on feature1. if you just commit a fix on it normally, git rebase feature1 (and then handling any merge conflicts in E and F) will work fine. that's why you generally don't need to know this; it's only necessary if you're manipulating your commit history because you think it'll provide useful clarity and think that's worth the complexity in your git workflow. I do it a fair amount because I tend to juggle multiple potential changes to the same code at once more than is probably wise, but I definitely lean toward not doing it, particularly in a codebase that uses squash merging for PRs and discards all of this history in the end anyway.
3 notes · View notes
hackeocafe · 5 months ago
Text
youtube
Git & GitHub Crash Course 2025
This is a crash course to learn the fundamentals of Git version control and the Github platform. Learn all of the core commands and the workflow to start learning Git.
4 notes · View notes